@tomorrowevening/hermes 0.0.109 → 0.0.111
Sign up to get free protection for your applications and to get access to all the features.
- package/dist/hermes.cjs.js +7 -7
- package/dist/hermes.es.js +322 -289
- package/package.json +1 -1
- package/types/editor/multiView/MultiView.d.ts +116 -115
package/dist/hermes.es.js
CHANGED
@@ -1,10 +1,10 @@
|
|
1
|
-
import { OrthographicCamera as wi, Scene as Ds, MeshBasicMaterial as
|
2
|
-
import Js, { useState as Z, useRef as ee, useEffect as ct, useMemo as
|
1
|
+
import { OrthographicCamera as wi, Scene as Ds, MeshBasicMaterial as Ge, BufferGeometry as ot, Float32BufferAttribute as Ze, Mesh as w, LinearSRGBColorSpace as $i, EventDispatcher as Rs, Texture as In, RepeatWrapping as qi, WebGLRenderTarget as Ln, Color as Mt, FrontSide as kn, BackSide as Is, DoubleSide as Ri, NoBlending as Un, NormalBlending as jn, AdditiveBlending as Nn, SubtractiveBlending as Fn, MultiplyBlending as zn, CustomBlending as Hn, AddEquation as Yn, SubtractEquation as Bn, ReverseSubtractEquation as Vn, MinEquation as Zn, MaxEquation as Wn, ZeroFactor as Ls, OneFactor as ks, SrcColorFactor as Us, OneMinusSrcColorFactor as js, SrcAlphaFactor as Ns, OneMinusSrcAlphaFactor as Fs, DstAlphaFactor as zs, OneMinusDstAlphaFactor as Hs, DstColorFactor as Ys, OneMinusDstColorFactor as Bs, SrcAlphaSaturateFactor as Gn, ConstantColorFactor as Vs, OneMinusConstantColorFactor as Zs, ConstantAlphaFactor as Ws, OneMinusConstantAlphaFactor as Gs, Line as xe, LineBasicMaterial as Ii, Ray as Xn, Plane as Qn, MathUtils as $n, Vector3 as O, Controls as Xs, MOUSE as rt, TOUCH as at, Quaternion as fe, Spherical as Si, Vector2 as oe, ShaderMaterial as Qs, GLSL3 as qn, PlaneGeometry as $s, Raycaster as Qt, Euler as qs, Matrix4 as Jt, Object3D as lt, CylinderGeometry as de, BoxGeometry as ae, OctahedronGeometry as Ut, SphereGeometry as Ks, TorusGeometry as ut, CatmullRomCurve3 as Ki, Group as Kn, AxesHelper as Ji, MeshDepthMaterial as Jn, MeshNormalMaterial as ea, PerspectiveCamera as pt, WebGLRenderer as ta, CameraHelper as ia, SkinnedMesh as sa, SpotLightHelper as na, PointLightHelper as aa, HemisphereLightHelper as ra, DirectionalLightHelper as oa, Clock as la, Vector4 as ca, Box3 as ha, Sphere as da } from "three";
|
2
|
+
import Js, { useState as Z, useRef as ee, useEffect as ct, useMemo as Tt, Component as ei, createRef as Ie, forwardRef as ua } from "react";
|
3
3
|
import { Reorder as en } from "framer-motion";
|
4
4
|
const tn = () => {
|
5
5
|
}, Vr = () => {
|
6
6
|
};
|
7
|
-
function
|
7
|
+
function $t(i) {
|
8
8
|
return i.substring(0, 1).toUpperCase() + i.substring(1);
|
9
9
|
}
|
10
10
|
function pa(i) {
|
@@ -59,7 +59,7 @@ const is = () => {
|
|
59
59
|
}
|
60
60
|
}
|
61
61
|
i.children.forEach((t) => Ti(t));
|
62
|
-
},
|
62
|
+
}, Wr = (i) => {
|
63
63
|
i?.dispose();
|
64
64
|
}, ga = (i) => {
|
65
65
|
i && (Array.isArray(i) ? i.forEach((e) => e.dispose()) : i.dispose());
|
@@ -76,7 +76,7 @@ const is = () => {
|
|
76
76
|
i.dispose !== void 0 && i.dispose();
|
77
77
|
}
|
78
78
|
};
|
79
|
-
class
|
79
|
+
class Wt {
|
80
80
|
static renderer;
|
81
81
|
static canvas;
|
82
82
|
static context = null;
|
@@ -105,7 +105,7 @@ class Zt {
|
|
105
105
|
}
|
106
106
|
static renderToCanvas(e) {
|
107
107
|
if (this.material === null) {
|
108
|
-
this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ds(), this.material = new
|
108
|
+
this.camera = new wi(-0.5, 0.5, 0.5, -0.5, 0, 100), this.scene = new Ds(), this.material = new Ge();
|
109
109
|
const t = new ot();
|
110
110
|
t.setAttribute("position", new Ze([-0.5, -0.5, 0, 1.5, -0.5, 0, -0.5, 1.5, 0], 3)), t.setAttribute("normal", new Ze([0, 0, 1, 0, 0, 1], 3)), t.setAttribute("uv", new Ze([0, 0, 2, 0, 0, 2], 2));
|
111
111
|
const s = new w(t, this.material);
|
@@ -120,7 +120,7 @@ class Zt {
|
|
120
120
|
return this.renderer.domElement;
|
121
121
|
}
|
122
122
|
}
|
123
|
-
class
|
123
|
+
class Gr {
|
124
124
|
components = /* @__PURE__ */ new Map();
|
125
125
|
listen;
|
126
126
|
// Protected
|
@@ -268,13 +268,30 @@ function Qr(i, e, t) {
|
|
268
268
|
t.ui.hide();
|
269
269
|
}
|
270
270
|
function $r() {
|
271
|
-
|
272
|
-
|
273
|
-
|
274
|
-
|
275
|
-
|
276
|
-
|
277
|
-
|
271
|
+
setTimeout(() => {
|
272
|
+
const i = document.getElementById("theatrejs-studio-root");
|
273
|
+
if (i === null || i.shadowRoot === null)
|
274
|
+
return;
|
275
|
+
const e = i.shadowRoot.getElementById("pointer-root");
|
276
|
+
if (e === null)
|
277
|
+
return;
|
278
|
+
const t = e.children[0];
|
279
|
+
if (t === null)
|
280
|
+
return;
|
281
|
+
const s = t.children[1];
|
282
|
+
s.style.justifyContent = "left";
|
283
|
+
try {
|
284
|
+
const n = s.children[1];
|
285
|
+
for (n.style.transform = "translateX(10px)"; n.children.length > 1; )
|
286
|
+
n.removeChild(n.children[0]);
|
287
|
+
} catch {
|
288
|
+
}
|
289
|
+
try {
|
290
|
+
const n = t.children[3];
|
291
|
+
n.style.top = "0", n.style.right = "300px";
|
292
|
+
} catch {
|
293
|
+
}
|
294
|
+
}, 1e3);
|
278
295
|
}
|
279
296
|
class qr extends Li {
|
280
297
|
project;
|
@@ -517,7 +534,7 @@ function qe(i) {
|
|
517
534
|
break;
|
518
535
|
case "object":
|
519
536
|
n !== null ? (e[t] = n, n.isTexture ? e[t] = {
|
520
|
-
src:
|
537
|
+
src: Wt.renderToBlob(n),
|
521
538
|
offset: [n.offset.x, n.offset.y],
|
522
539
|
repeat: [n.repeat.x, n.repeat.y]
|
523
540
|
} : t === "uniforms" && (e[t] = va(e[t]))) : t === "glslVersion" ? e[t] = "" : e[t] = {
|
@@ -632,7 +649,7 @@ function Ea(i, e) {
|
|
632
649
|
for (const t in e)
|
633
650
|
i[t] = e[t];
|
634
651
|
}
|
635
|
-
function
|
652
|
+
function q(i, e, t) {
|
636
653
|
if (i === void 0)
|
637
654
|
return;
|
638
655
|
const s = e.split("."), n = s.length;
|
@@ -699,14 +716,14 @@ class Kr extends Li {
|
|
699
716
|
}), this.renderTargets.clear(), this.renderer?.dispose();
|
700
717
|
}
|
701
718
|
getObject(e) {
|
702
|
-
this.app.debugEnabled && (this.renderer !== void 0 && (
|
719
|
+
this.app.debugEnabled && (this.renderer !== void 0 && (Wt.renderer = this.renderer), this.app.send({
|
703
720
|
event: "getObject",
|
704
721
|
target: "app",
|
705
722
|
data: e
|
706
723
|
}));
|
707
724
|
}
|
708
725
|
setObject(e) {
|
709
|
-
this.renderer !== void 0 && (
|
726
|
+
this.renderer !== void 0 && (Wt.renderer = this.renderer);
|
710
727
|
const t = di(e);
|
711
728
|
this.app.send({
|
712
729
|
event: "setObject",
|
@@ -839,7 +856,7 @@ class Kr extends Li {
|
|
839
856
|
setScene(e) {
|
840
857
|
if (e === void 0 || (this.scene = e, !this.app.debugEnabled))
|
841
858
|
return;
|
842
|
-
this.renderer !== void 0 && (
|
859
|
+
this.renderer !== void 0 && (Wt.renderer = this.renderer), is(), Ti(e);
|
843
860
|
const t = nt(e);
|
844
861
|
this.app.send({
|
845
862
|
event: "setScene",
|
@@ -957,7 +974,7 @@ class Kr extends Li {
|
|
957
974
|
return this.renderer !== void 0 ? this.renderer?.domElement : null;
|
958
975
|
}
|
959
976
|
}
|
960
|
-
var Mi = { exports: {} },
|
977
|
+
var Mi = { exports: {} }, mt = {};
|
961
978
|
/**
|
962
979
|
* @license React
|
963
980
|
* react-jsx-runtime.production.min.js
|
@@ -970,7 +987,7 @@ var Mi = { exports: {} }, pt = {};
|
|
970
987
|
var ss;
|
971
988
|
function Ca() {
|
972
989
|
if (ss)
|
973
|
-
return
|
990
|
+
return mt;
|
974
991
|
ss = 1;
|
975
992
|
var i = Js, e = Symbol.for("react.element"), t = Symbol.for("react.fragment"), s = Object.prototype.hasOwnProperty, n = i.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, r = { key: !0, ref: !0, __self: !0, __source: !0 };
|
976
993
|
function a(o, c, l) {
|
@@ -983,9 +1000,9 @@ function Ca() {
|
|
983
1000
|
p[u] === void 0 && (p[u] = c[u]);
|
984
1001
|
return { $$typeof: e, type: o, key: m, ref: _, props: p, _owner: n.current };
|
985
1002
|
}
|
986
|
-
return
|
1003
|
+
return mt.Fragment = t, mt.jsx = a, mt.jsxs = a, mt;
|
987
1004
|
}
|
988
|
-
var
|
1005
|
+
var ft = {};
|
989
1006
|
/**
|
990
1007
|
* @license React
|
991
1008
|
* react-jsx-runtime.development.js
|
@@ -1088,17 +1105,17 @@ function wa() {
|
|
1088
1105
|
return null;
|
1089
1106
|
}
|
1090
1107
|
var te = Object.assign, Q = 0, ke, he, Te, se, Ue, je, Ne;
|
1091
|
-
function Mt() {
|
1092
|
-
}
|
1093
|
-
Mt.__reactDisabledLog = !0;
|
1094
1108
|
function Pt() {
|
1109
|
+
}
|
1110
|
+
Pt.__reactDisabledLog = !0;
|
1111
|
+
function At() {
|
1095
1112
|
{
|
1096
1113
|
if (Q === 0) {
|
1097
1114
|
ke = console.log, he = console.info, Te = console.warn, se = console.error, Ue = console.group, je = console.groupCollapsed, Ne = console.groupEnd;
|
1098
1115
|
var h = {
|
1099
1116
|
configurable: !0,
|
1100
1117
|
enumerable: !0,
|
1101
|
-
value:
|
1118
|
+
value: Pt,
|
1102
1119
|
writable: !0
|
1103
1120
|
};
|
1104
1121
|
Object.defineProperties(console, {
|
@@ -1149,39 +1166,39 @@ function wa() {
|
|
1149
1166
|
Q < 0 && v("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
1150
1167
|
}
|
1151
1168
|
}
|
1152
|
-
var
|
1153
|
-
function
|
1169
|
+
var si = g.ReactCurrentDispatcher, ni;
|
1170
|
+
function Dt(h, y, C) {
|
1154
1171
|
{
|
1155
|
-
if (
|
1172
|
+
if (ni === void 0)
|
1156
1173
|
try {
|
1157
1174
|
throw Error();
|
1158
1175
|
} catch (F) {
|
1159
1176
|
var I = F.stack.trim().match(/\n( *(at )?)/);
|
1160
|
-
|
1177
|
+
ni = I && I[1] || "";
|
1161
1178
|
}
|
1162
1179
|
return `
|
1163
|
-
` +
|
1180
|
+
` + ni + h;
|
1164
1181
|
}
|
1165
1182
|
}
|
1166
|
-
var
|
1183
|
+
var ai = !1, Rt;
|
1167
1184
|
{
|
1168
1185
|
var hn = typeof WeakMap == "function" ? WeakMap : Map;
|
1169
|
-
|
1186
|
+
Rt = new hn();
|
1170
1187
|
}
|
1171
1188
|
function Ui(h, y) {
|
1172
|
-
if (!h ||
|
1189
|
+
if (!h || ai)
|
1173
1190
|
return "";
|
1174
1191
|
{
|
1175
|
-
var C =
|
1192
|
+
var C = Rt.get(h);
|
1176
1193
|
if (C !== void 0)
|
1177
1194
|
return C;
|
1178
1195
|
}
|
1179
1196
|
var I;
|
1180
|
-
|
1197
|
+
ai = !0;
|
1181
1198
|
var F = Error.prepareStackTrace;
|
1182
1199
|
Error.prepareStackTrace = void 0;
|
1183
1200
|
var Y;
|
1184
|
-
Y =
|
1201
|
+
Y = si.current, si.current = null, At();
|
1185
1202
|
try {
|
1186
1203
|
if (y) {
|
1187
1204
|
var U = function() {
|
@@ -1218,26 +1235,26 @@ function wa() {
|
|
1218
1235
|
if (Me && I && typeof Me.stack == "string") {
|
1219
1236
|
for (var k = Me.stack.split(`
|
1220
1237
|
`), le = I.stack.split(`
|
1221
|
-
`), $ = k.length - 1,
|
1222
|
-
|
1223
|
-
for (; $ >= 1 &&
|
1224
|
-
if (k[$] !== le[
|
1225
|
-
if ($ !== 1 ||
|
1238
|
+
`), $ = k.length - 1, K = le.length - 1; $ >= 1 && K >= 0 && k[$] !== le[K]; )
|
1239
|
+
K--;
|
1240
|
+
for (; $ >= 1 && K >= 0; $--, K--)
|
1241
|
+
if (k[$] !== le[K]) {
|
1242
|
+
if ($ !== 1 || K !== 1)
|
1226
1243
|
do
|
1227
|
-
if ($--,
|
1244
|
+
if ($--, K--, K < 0 || k[$] !== le[K]) {
|
1228
1245
|
var _e = `
|
1229
1246
|
` + k[$].replace(" at new ", " at ");
|
1230
|
-
return h.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", h.displayName)), typeof h == "function" &&
|
1247
|
+
return h.displayName && _e.includes("<anonymous>") && (_e = _e.replace("<anonymous>", h.displayName)), typeof h == "function" && Rt.set(h, _e), _e;
|
1231
1248
|
}
|
1232
|
-
while ($ >= 1 &&
|
1249
|
+
while ($ >= 1 && K >= 0);
|
1233
1250
|
break;
|
1234
1251
|
}
|
1235
1252
|
}
|
1236
1253
|
} finally {
|
1237
|
-
|
1254
|
+
ai = !1, si.current = Y, cn(), Error.prepareStackTrace = F;
|
1238
1255
|
}
|
1239
|
-
var $e = h ? h.displayName || h.name : "", Qi = $e ?
|
1240
|
-
return typeof h == "function" &&
|
1256
|
+
var $e = h ? h.displayName || h.name : "", Qi = $e ? Dt($e) : "";
|
1257
|
+
return typeof h == "function" && Rt.set(h, Qi), Qi;
|
1241
1258
|
}
|
1242
1259
|
function dn(h, y, C) {
|
1243
1260
|
return Ui(h, !1);
|
@@ -1246,46 +1263,46 @@ function wa() {
|
|
1246
1263
|
var y = h.prototype;
|
1247
1264
|
return !!(y && y.isReactComponent);
|
1248
1265
|
}
|
1249
|
-
function
|
1266
|
+
function It(h, y, C) {
|
1250
1267
|
if (h == null)
|
1251
1268
|
return "";
|
1252
1269
|
if (typeof h == "function")
|
1253
1270
|
return Ui(h, un(h));
|
1254
1271
|
if (typeof h == "string")
|
1255
|
-
return
|
1272
|
+
return Dt(h);
|
1256
1273
|
switch (h) {
|
1257
1274
|
case l:
|
1258
|
-
return
|
1275
|
+
return Dt("Suspense");
|
1259
1276
|
case u:
|
1260
|
-
return
|
1277
|
+
return Dt("SuspenseList");
|
1261
1278
|
}
|
1262
1279
|
if (typeof h == "object")
|
1263
1280
|
switch (h.$$typeof) {
|
1264
1281
|
case c:
|
1265
1282
|
return dn(h.render);
|
1266
1283
|
case p:
|
1267
|
-
return
|
1284
|
+
return It(h.type, y, C);
|
1268
1285
|
case m: {
|
1269
1286
|
var I = h, F = I._payload, Y = I._init;
|
1270
1287
|
try {
|
1271
|
-
return
|
1288
|
+
return It(Y(F), y, C);
|
1272
1289
|
} catch {
|
1273
1290
|
}
|
1274
1291
|
}
|
1275
1292
|
}
|
1276
1293
|
return "";
|
1277
1294
|
}
|
1278
|
-
var
|
1279
|
-
function
|
1295
|
+
var Lt = Object.prototype.hasOwnProperty, ji = {}, Ni = g.ReactDebugCurrentFrame;
|
1296
|
+
function kt(h) {
|
1280
1297
|
if (h) {
|
1281
|
-
var y = h._owner, C =
|
1298
|
+
var y = h._owner, C = It(h.type, h._source, y ? y.type : null);
|
1282
1299
|
Ni.setExtraStackFrame(C);
|
1283
1300
|
} else
|
1284
1301
|
Ni.setExtraStackFrame(null);
|
1285
1302
|
}
|
1286
1303
|
function pn(h, y, C, I, F) {
|
1287
1304
|
{
|
1288
|
-
var Y = Function.call.bind(
|
1305
|
+
var Y = Function.call.bind(Lt);
|
1289
1306
|
for (var U in h)
|
1290
1307
|
if (Y(h, U)) {
|
1291
1308
|
var k = void 0;
|
@@ -1298,12 +1315,12 @@ function wa() {
|
|
1298
1315
|
} catch ($) {
|
1299
1316
|
k = $;
|
1300
1317
|
}
|
1301
|
-
k && !(k instanceof Error) && (
|
1318
|
+
k && !(k instanceof Error) && (kt(F), v("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", I || "React class", C, U, typeof k), kt(null)), k instanceof Error && !(k.message in ji) && (ji[k.message] = !0, kt(F), v("Failed %s type: %s", C, k.message), kt(null));
|
1302
1319
|
}
|
1303
1320
|
}
|
1304
1321
|
}
|
1305
1322
|
var mn = Array.isArray;
|
1306
|
-
function
|
1323
|
+
function ri(h) {
|
1307
1324
|
return mn(h);
|
1308
1325
|
}
|
1309
1326
|
function fn(h) {
|
@@ -1331,10 +1348,10 @@ function wa() {
|
|
1331
1348
|
ref: !0,
|
1332
1349
|
__self: !0,
|
1333
1350
|
__source: !0
|
1334
|
-
}, Hi, Yi,
|
1335
|
-
|
1351
|
+
}, Hi, Yi, oi;
|
1352
|
+
oi = {};
|
1336
1353
|
function vn(h) {
|
1337
|
-
if (
|
1354
|
+
if (Lt.call(h, "ref")) {
|
1338
1355
|
var y = Object.getOwnPropertyDescriptor(h, "ref").get;
|
1339
1356
|
if (y && y.isReactWarning)
|
1340
1357
|
return !1;
|
@@ -1342,7 +1359,7 @@ function wa() {
|
|
1342
1359
|
return h.ref !== void 0;
|
1343
1360
|
}
|
1344
1361
|
function yn(h) {
|
1345
|
-
if (
|
1362
|
+
if (Lt.call(h, "key")) {
|
1346
1363
|
var y = Object.getOwnPropertyDescriptor(h, "key").get;
|
1347
1364
|
if (y && y.isReactWarning)
|
1348
1365
|
return !1;
|
@@ -1352,7 +1369,7 @@ function wa() {
|
|
1352
1369
|
function bn(h, y) {
|
1353
1370
|
if (typeof h.ref == "string" && dt.current && y && dt.current.stateNode !== y) {
|
1354
1371
|
var C = me(dt.current.type);
|
1355
|
-
|
1372
|
+
oi[C] || (v('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', me(dt.current.type), h.ref), oi[C] = !0);
|
1356
1373
|
}
|
1357
1374
|
}
|
1358
1375
|
function En(h, y) {
|
@@ -1411,36 +1428,36 @@ function wa() {
|
|
1411
1428
|
var Y, U = {}, k = null, le = null;
|
1412
1429
|
C !== void 0 && (zi(C), k = "" + C), yn(y) && (zi(y.key), k = "" + y.key), vn(y) && (le = y.ref, bn(y, F));
|
1413
1430
|
for (Y in y)
|
1414
|
-
|
1431
|
+
Lt.call(y, Y) && !_n.hasOwnProperty(Y) && (U[Y] = y[Y]);
|
1415
1432
|
if (h && h.defaultProps) {
|
1416
1433
|
var $ = h.defaultProps;
|
1417
1434
|
for (Y in $)
|
1418
1435
|
U[Y] === void 0 && (U[Y] = $[Y]);
|
1419
1436
|
}
|
1420
1437
|
if (k || le) {
|
1421
|
-
var
|
1422
|
-
k && En(U,
|
1438
|
+
var K = typeof h == "function" ? h.displayName || h.name || "Unknown" : h;
|
1439
|
+
k && En(U, K), le && Cn(U, K);
|
1423
1440
|
}
|
1424
1441
|
return wn(h, k, le, F, I, dt.current, U);
|
1425
1442
|
}
|
1426
1443
|
}
|
1427
|
-
var
|
1444
|
+
var li = g.ReactCurrentOwner, Bi = g.ReactDebugCurrentFrame;
|
1428
1445
|
function Qe(h) {
|
1429
1446
|
if (h) {
|
1430
|
-
var y = h._owner, C =
|
1447
|
+
var y = h._owner, C = It(h.type, h._source, y ? y.type : null);
|
1431
1448
|
Bi.setExtraStackFrame(C);
|
1432
1449
|
} else
|
1433
1450
|
Bi.setExtraStackFrame(null);
|
1434
1451
|
}
|
1435
|
-
var
|
1436
|
-
|
1437
|
-
function
|
1452
|
+
var ci;
|
1453
|
+
ci = !1;
|
1454
|
+
function hi(h) {
|
1438
1455
|
return typeof h == "object" && h !== null && h.$$typeof === e;
|
1439
1456
|
}
|
1440
1457
|
function Vi() {
|
1441
1458
|
{
|
1442
|
-
if (
|
1443
|
-
var h = me(
|
1459
|
+
if (li.current) {
|
1460
|
+
var h = me(li.current.type);
|
1444
1461
|
if (h)
|
1445
1462
|
return `
|
1446
1463
|
|
@@ -1473,7 +1490,7 @@ Check the top-level render call using <` + C + ">.");
|
|
1473
1490
|
return y;
|
1474
1491
|
}
|
1475
1492
|
}
|
1476
|
-
function
|
1493
|
+
function Wi(h, y) {
|
1477
1494
|
{
|
1478
1495
|
if (!h._store || h._store.validated || h.key != null)
|
1479
1496
|
return;
|
@@ -1483,25 +1500,25 @@ Check the top-level render call using <` + C + ">.");
|
|
1483
1500
|
return;
|
1484
1501
|
Zi[C] = !0;
|
1485
1502
|
var I = "";
|
1486
|
-
h && h._owner && h._owner !==
|
1503
|
+
h && h._owner && h._owner !== li.current && (I = " It was passed a child from " + me(h._owner.type) + "."), Qe(h), v('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', C, I), Qe(null);
|
1487
1504
|
}
|
1488
1505
|
}
|
1489
|
-
function
|
1506
|
+
function Gi(h, y) {
|
1490
1507
|
{
|
1491
1508
|
if (typeof h != "object")
|
1492
1509
|
return;
|
1493
|
-
if (
|
1510
|
+
if (ri(h))
|
1494
1511
|
for (var C = 0; C < h.length; C++) {
|
1495
1512
|
var I = h[C];
|
1496
|
-
|
1513
|
+
hi(I) && Wi(I, y);
|
1497
1514
|
}
|
1498
|
-
else if (
|
1515
|
+
else if (hi(h))
|
1499
1516
|
h._store && (h._store.validated = !0);
|
1500
1517
|
else if (h) {
|
1501
1518
|
var F = M(h);
|
1502
1519
|
if (typeof F == "function" && F !== h.entries)
|
1503
1520
|
for (var Y = F.call(h), U; !(U = Y.next()).done; )
|
1504
|
-
|
1521
|
+
hi(U.value) && Wi(U.value, y);
|
1505
1522
|
}
|
1506
1523
|
}
|
1507
1524
|
}
|
@@ -1522,8 +1539,8 @@ Check the top-level render call using <` + C + ">.");
|
|
1522
1539
|
if (C) {
|
1523
1540
|
var I = me(y);
|
1524
1541
|
pn(C, h.props, "prop", I, h);
|
1525
|
-
} else if (y.PropTypes !== void 0 && !
|
1526
|
-
|
1542
|
+
} else if (y.PropTypes !== void 0 && !ci) {
|
1543
|
+
ci = !0;
|
1527
1544
|
var F = me(y);
|
1528
1545
|
v("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
|
1529
1546
|
}
|
@@ -1551,25 +1568,25 @@ Check the top-level render call using <` + C + ">.");
|
|
1551
1568
|
var le = xn(F);
|
1552
1569
|
le ? k += le : k += Vi();
|
1553
1570
|
var $;
|
1554
|
-
h === null ? $ = "null" :
|
1571
|
+
h === null ? $ = "null" : ri(h) ? $ = "array" : h !== void 0 && h.$$typeof === e ? ($ = "<" + (me(h.type) || "Unknown") + " />", k = " Did you accidentally export a JSX literal instead of a component?") : $ = typeof h, v("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", $, k);
|
1555
1572
|
}
|
1556
|
-
var
|
1557
|
-
if (
|
1558
|
-
return
|
1573
|
+
var K = Sn(h, y, C, F, Y);
|
1574
|
+
if (K == null)
|
1575
|
+
return K;
|
1559
1576
|
if (U) {
|
1560
1577
|
var _e = y.children;
|
1561
1578
|
if (_e !== void 0)
|
1562
1579
|
if (I)
|
1563
|
-
if (
|
1580
|
+
if (ri(_e)) {
|
1564
1581
|
for (var $e = 0; $e < _e.length; $e++)
|
1565
|
-
|
1582
|
+
Gi(_e[$e], h);
|
1566
1583
|
Object.freeze && Object.freeze(_e);
|
1567
1584
|
} else
|
1568
1585
|
v("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1569
1586
|
else
|
1570
|
-
|
1587
|
+
Gi(_e, h);
|
1571
1588
|
}
|
1572
|
-
return h === s ? Mn(
|
1589
|
+
return h === s ? Mn(K) : Tn(K), K;
|
1573
1590
|
}
|
1574
1591
|
}
|
1575
1592
|
function Pn(h, y, C) {
|
@@ -1579,8 +1596,8 @@ Check the top-level render call using <` + C + ">.");
|
|
1579
1596
|
return Xi(h, y, C, !1);
|
1580
1597
|
}
|
1581
1598
|
var Dn = An, Rn = Pn;
|
1582
|
-
|
1583
|
-
}()),
|
1599
|
+
ft.Fragment = s, ft.jsx = Dn, ft.jsxs = Rn;
|
1600
|
+
}()), ft;
|
1584
1601
|
}
|
1585
1602
|
process.env.NODE_ENV === "production" ? Mi.exports = Ca() : Mi.exports = wa();
|
1586
1603
|
var d = Mi.exports;
|
@@ -1714,7 +1731,7 @@ function Jr(i, e, t) {
|
|
1714
1731
|
r.target === "editor" ? n(r) : s(r);
|
1715
1732
|
};
|
1716
1733
|
}
|
1717
|
-
function
|
1734
|
+
function qt(i) {
|
1718
1735
|
const [e, t] = Z(i.open !== void 0 ? i.open : !0), s = !e || i.children === void 0, n = () => {
|
1719
1736
|
D.dispatchEvent({ type: A.REMOVE_SCENE, value: i.scene });
|
1720
1737
|
};
|
@@ -1735,7 +1752,7 @@ function $t(i) {
|
|
1735
1752
|
children: "Toggle"
|
1736
1753
|
}
|
1737
1754
|
),
|
1738
|
-
/* @__PURE__ */ d.jsx("p", { className: "label", children:
|
1755
|
+
/* @__PURE__ */ d.jsx("p", { className: "label", children: $t(i.label) })
|
1739
1756
|
]
|
1740
1757
|
}
|
1741
1758
|
),
|
@@ -1798,7 +1815,7 @@ function an(i) {
|
|
1798
1815
|
const o = a.getObjectByProperty("uuid", i.child.uuid);
|
1799
1816
|
if (o !== void 0) {
|
1800
1817
|
const c = "visible", l = !o.visible;
|
1801
|
-
e.current.style.opacity = l ? "1" : "0.25", i.three.updateObject(i.child.uuid, c, l),
|
1818
|
+
e.current.style.opacity = l ? "1" : "0.25", i.three.updateObject(i.child.uuid, c, l), q(o, c, l);
|
1802
1819
|
}
|
1803
1820
|
}
|
1804
1821
|
}
|
@@ -1841,7 +1858,7 @@ function Aa(i) {
|
|
1841
1858
|
};
|
1842
1859
|
}, []), e;
|
1843
1860
|
}
|
1844
|
-
function
|
1861
|
+
function We(i) {
|
1845
1862
|
const e = ee(null), t = ee(null), s = Aa({
|
1846
1863
|
label: i.labelRef,
|
1847
1864
|
input: e,
|
@@ -2018,14 +2035,14 @@ function La(i) {
|
|
2018
2035
|
function rs(i) {
|
2019
2036
|
const e = i.value.x !== void 0 && i.value.y !== void 0 && i.value.z !== void 0, t = i.value.isEuler !== void 0, s = i.value.elements !== void 0, n = i.step !== void 0 ? i.step : 0.01, r = [];
|
2020
2037
|
if (t) {
|
2021
|
-
const a =
|
2038
|
+
const a = Tt(() => i.value, []);
|
2022
2039
|
["_x", "_y", "_z"].forEach((c) => {
|
2023
2040
|
const l = ee(null);
|
2024
2041
|
r.push(
|
2025
2042
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
2026
2043
|
/* @__PURE__ */ d.jsx("label", { ref: l, children: c.substring(1).toUpperCase() }),
|
2027
2044
|
/* @__PURE__ */ d.jsx(
|
2028
|
-
|
2045
|
+
We,
|
2029
2046
|
{
|
2030
2047
|
value: La(a[c]),
|
2031
2048
|
type: "number",
|
@@ -2041,7 +2058,7 @@ function rs(i) {
|
|
2041
2058
|
);
|
2042
2059
|
});
|
2043
2060
|
} else if (e) {
|
2044
|
-
const a =
|
2061
|
+
const a = Tt(() => i.value, []), o = (l, u) => {
|
2045
2062
|
a[l] = u, i.onChange({ target: { value: a } });
|
2046
2063
|
};
|
2047
2064
|
["x", "y", "z"].forEach((l) => {
|
@@ -2050,7 +2067,7 @@ function rs(i) {
|
|
2050
2067
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
2051
2068
|
/* @__PURE__ */ d.jsx("label", { ref: u, children: l.toUpperCase() }),
|
2052
2069
|
/* @__PURE__ */ d.jsx(
|
2053
|
-
|
2070
|
+
We,
|
2054
2071
|
{
|
2055
2072
|
value: a[l],
|
2056
2073
|
type: "number",
|
@@ -2064,7 +2081,7 @@ function rs(i) {
|
|
2064
2081
|
);
|
2065
2082
|
});
|
2066
2083
|
} else if (s) {
|
2067
|
-
const a =
|
2084
|
+
const a = Tt(() => i.value, []), o = (c, l) => {
|
2068
2085
|
const u = Number(c);
|
2069
2086
|
a.elements[u] = l, i.onChange({ target: { value: a } });
|
2070
2087
|
};
|
@@ -2074,7 +2091,7 @@ function rs(i) {
|
|
2074
2091
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
2075
2092
|
/* @__PURE__ */ d.jsx("label", { ref: l, children: c + 1 }),
|
2076
2093
|
/* @__PURE__ */ d.jsx(
|
2077
|
-
|
2094
|
+
We,
|
2078
2095
|
{
|
2079
2096
|
value: a.elements[c],
|
2080
2097
|
type: "number",
|
@@ -2093,7 +2110,7 @@ function rs(i) {
|
|
2093
2110
|
function ka(i) {
|
2094
2111
|
const e = i.value.x !== void 0, t = i.step !== void 0 ? i.step : 0.01, s = [];
|
2095
2112
|
if (e) {
|
2096
|
-
const n =
|
2113
|
+
const n = Tt(() => i.value, []), r = (o, c) => {
|
2097
2114
|
n[o] = c, i.onChange({ target: { value: n } });
|
2098
2115
|
};
|
2099
2116
|
["x", "y", "z", "w"].forEach((o) => {
|
@@ -2102,7 +2119,7 @@ function ka(i) {
|
|
2102
2119
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
2103
2120
|
/* @__PURE__ */ d.jsx("label", { ref: c, children: o.toUpperCase() }),
|
2104
2121
|
/* @__PURE__ */ d.jsx(
|
2105
|
-
|
2122
|
+
We,
|
2106
2123
|
{
|
2107
2124
|
value: n.x,
|
2108
2125
|
type: "number",
|
@@ -2116,7 +2133,7 @@ function ka(i) {
|
|
2116
2133
|
);
|
2117
2134
|
});
|
2118
2135
|
} else {
|
2119
|
-
const n =
|
2136
|
+
const n = Tt(() => i.value, []), r = (a, o) => {
|
2120
2137
|
const c = Number(a);
|
2121
2138
|
n.elements[c] = o, i.onChange({ target: { value: n } });
|
2122
2139
|
};
|
@@ -2126,7 +2143,7 @@ function ka(i) {
|
|
2126
2143
|
/* @__PURE__ */ d.jsxs("div", { children: [
|
2127
2144
|
/* @__PURE__ */ d.jsx("label", { ref: o, children: a + 1 }),
|
2128
2145
|
/* @__PURE__ */ d.jsx(
|
2129
|
-
|
2146
|
+
We,
|
2130
2147
|
{
|
2131
2148
|
value: n.elements[a],
|
2132
2149
|
type: "number",
|
@@ -2194,7 +2211,7 @@ function ja(i) {
|
|
2194
2211
|
}
|
2195
2212
|
return i;
|
2196
2213
|
}
|
2197
|
-
function
|
2214
|
+
function ti(i) {
|
2198
2215
|
switch (i) {
|
2199
2216
|
case "alphaHash":
|
2200
2217
|
return "Alpha Hash";
|
@@ -2473,7 +2490,7 @@ const Fa = [
|
|
2473
2490
|
},
|
2474
2491
|
{
|
2475
2492
|
title: "Max",
|
2476
|
-
value:
|
2493
|
+
value: Wn
|
2477
2494
|
}
|
2478
2495
|
], Ya = [
|
2479
2496
|
{
|
@@ -2518,7 +2535,7 @@ const Fa = [
|
|
2518
2535
|
},
|
2519
2536
|
{
|
2520
2537
|
title: "Src Alpha Saturate",
|
2521
|
-
value:
|
2538
|
+
value: Gn
|
2522
2539
|
},
|
2523
2540
|
{
|
2524
2541
|
title: "Constant Color",
|
@@ -2530,11 +2547,11 @@ const Fa = [
|
|
2530
2547
|
},
|
2531
2548
|
{
|
2532
2549
|
title: "Constant Alpha",
|
2533
|
-
value:
|
2550
|
+
value: Ws
|
2534
2551
|
},
|
2535
2552
|
{
|
2536
2553
|
title: "One Minus Constant Alpha",
|
2537
|
-
value:
|
2554
|
+
value: Gs
|
2538
2555
|
}
|
2539
2556
|
], Ba = [
|
2540
2557
|
{
|
@@ -2587,20 +2604,20 @@ const Fa = [
|
|
2587
2604
|
},
|
2588
2605
|
{
|
2589
2606
|
title: "Constant Alpha",
|
2590
|
-
value:
|
2607
|
+
value: Ws
|
2591
2608
|
},
|
2592
2609
|
{
|
2593
2610
|
title: "One Minus Constant Alpha",
|
2594
|
-
value:
|
2611
|
+
value: Gs
|
2595
2612
|
}
|
2596
2613
|
];
|
2597
|
-
function
|
2614
|
+
function gt(i, e) {
|
2598
2615
|
i.needsUpdate = !0, i.type = "option", i.options = e;
|
2599
2616
|
}
|
2600
2617
|
function Va(i, e, t, s) {
|
2601
2618
|
return {
|
2602
2619
|
type: "boolean",
|
2603
|
-
title:
|
2620
|
+
title: ti(i),
|
2604
2621
|
prop: i,
|
2605
2622
|
value: e,
|
2606
2623
|
needsUpdate: !0,
|
@@ -2609,7 +2626,7 @@ function Va(i, e, t, s) {
|
|
2609
2626
|
const a = s.getScene(t.uuid);
|
2610
2627
|
if (a !== null) {
|
2611
2628
|
const o = a.getObjectByProperty("uuid", t.uuid);
|
2612
|
-
|
2629
|
+
q(o, `material.${i}`, r);
|
2613
2630
|
}
|
2614
2631
|
}
|
2615
2632
|
};
|
@@ -2617,7 +2634,7 @@ function Va(i, e, t, s) {
|
|
2617
2634
|
function Za(i, e, t, s) {
|
2618
2635
|
const n = {
|
2619
2636
|
type: "number",
|
2620
|
-
title:
|
2637
|
+
title: ti(i),
|
2621
2638
|
prop: i,
|
2622
2639
|
value: e,
|
2623
2640
|
min: void 0,
|
@@ -2629,33 +2646,33 @@ function Za(i, e, t, s) {
|
|
2629
2646
|
const o = s.getScene(t.uuid);
|
2630
2647
|
if (o !== null) {
|
2631
2648
|
const c = o.getObjectByProperty("uuid", t.uuid);
|
2632
|
-
|
2649
|
+
q(c, `material.${i}`, a);
|
2633
2650
|
}
|
2634
2651
|
}
|
2635
2652
|
};
|
2636
2653
|
switch (i) {
|
2637
2654
|
case "blending":
|
2638
|
-
|
2655
|
+
gt(n, za);
|
2639
2656
|
break;
|
2640
2657
|
case "blendDst":
|
2641
|
-
|
2658
|
+
gt(n, Ba);
|
2642
2659
|
break;
|
2643
2660
|
case "blendEquation":
|
2644
|
-
|
2661
|
+
gt(n, Ha);
|
2645
2662
|
break;
|
2646
2663
|
case "blendSrc":
|
2647
|
-
|
2664
|
+
gt(n, Ya);
|
2648
2665
|
break;
|
2649
2666
|
case "side":
|
2650
|
-
|
2667
|
+
gt(n, Fa);
|
2651
2668
|
break;
|
2652
2669
|
}
|
2653
2670
|
return rn(i) && (n.value = Number(e), n.type = "range", n.min = Math.min(0, n.value), n.max = Math.max(1, n.value), n.step = 0.01), n;
|
2654
2671
|
}
|
2655
|
-
function
|
2672
|
+
function Wa(i, e, t, s) {
|
2656
2673
|
const n = {
|
2657
2674
|
type: "string",
|
2658
|
-
title:
|
2675
|
+
title: ti(i),
|
2659
2676
|
prop: i,
|
2660
2677
|
value: e,
|
2661
2678
|
needsUpdate: !0,
|
@@ -2664,7 +2681,7 @@ function Ga(i, e, t, s) {
|
|
2664
2681
|
const c = s.getScene(t.uuid);
|
2665
2682
|
if (c !== null) {
|
2666
2683
|
const l = c.getObjectByProperty("uuid", t.uuid);
|
2667
|
-
|
2684
|
+
q(l, `material.${i}`, o);
|
2668
2685
|
}
|
2669
2686
|
},
|
2670
2687
|
onKeyDown: (a) => {
|
@@ -2675,7 +2692,7 @@ function Ga(i, e, t, s) {
|
|
2675
2692
|
const c = s.getScene(t.uuid);
|
2676
2693
|
if (c !== null) {
|
2677
2694
|
const l = c.getObjectByProperty("uuid", t.uuid);
|
2678
|
-
|
2695
|
+
q(l, `material.${i}`, o);
|
2679
2696
|
}
|
2680
2697
|
}, n.onKeyDown = (a) => {
|
2681
2698
|
if (a.key === "Enter" && (a.altKey || a.metaKey)) {
|
@@ -2683,12 +2700,12 @@ function Ga(i, e, t, s) {
|
|
2683
2700
|
const o = s.getScene(t.uuid);
|
2684
2701
|
if (o !== null) {
|
2685
2702
|
const c = o.getObjectByProperty("uuid", t.uuid);
|
2686
|
-
|
2703
|
+
q(c, "material.needsUpdate", !0);
|
2687
2704
|
}
|
2688
2705
|
}
|
2689
2706
|
}), n;
|
2690
2707
|
}
|
2691
|
-
function
|
2708
|
+
function Ga(i) {
|
2692
2709
|
return i.x !== void 0 && i.y !== void 0 && i.z === void 0;
|
2693
2710
|
}
|
2694
2711
|
function Xa(i) {
|
@@ -2700,8 +2717,8 @@ function Qa(i) {
|
|
2700
2717
|
function Ai(i) {
|
2701
2718
|
i.sort((e, t) => e.title < t.title ? -1 : e.title > t.title ? 1 : 0);
|
2702
2719
|
}
|
2703
|
-
function
|
2704
|
-
const a =
|
2720
|
+
function St(i, e, t, s, n = "", r = !1) {
|
2721
|
+
const a = ti(i).split(".")[0].replaceAll("[", "").replaceAll("]", ""), o = n.length > 0 ? `${n}.${i}` : i, c = typeof e;
|
2705
2722
|
if (c === "boolean" || c === "string")
|
2706
2723
|
return {
|
2707
2724
|
title: a,
|
@@ -2714,7 +2731,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2714
2731
|
const p = s.getScene(t.uuid);
|
2715
2732
|
if (p !== null) {
|
2716
2733
|
const m = p.getObjectByProperty("uuid", t.uuid);
|
2717
|
-
|
2734
|
+
q(m, `material.${o}`, u);
|
2718
2735
|
}
|
2719
2736
|
}
|
2720
2737
|
};
|
@@ -2731,7 +2748,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2731
2748
|
const m = s.getScene(t.uuid);
|
2732
2749
|
if (m !== null) {
|
2733
2750
|
const _ = m.getObjectByProperty("uuid", t.uuid);
|
2734
|
-
|
2751
|
+
q(_, `material.${o}`, p);
|
2735
2752
|
}
|
2736
2753
|
}
|
2737
2754
|
};
|
@@ -2745,12 +2762,12 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2745
2762
|
value: e,
|
2746
2763
|
disabled: r,
|
2747
2764
|
onChange: (l, u) => {
|
2748
|
-
const p = new
|
2765
|
+
const p = new Mt(u);
|
2749
2766
|
s.updateObject(t.uuid, `material.${o}`, p);
|
2750
2767
|
const m = s.getScene(t.uuid);
|
2751
2768
|
if (m !== null) {
|
2752
2769
|
const _ = m.getObjectByProperty("uuid", t.uuid);
|
2753
|
-
|
2770
|
+
q(_, `material.${o}`, p);
|
2754
2771
|
}
|
2755
2772
|
}
|
2756
2773
|
};
|
@@ -2759,10 +2776,10 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2759
2776
|
for (const u in e) {
|
2760
2777
|
const p = e[u], m = `[${u.toString()}]`;
|
2761
2778
|
if (p.value !== void 0) {
|
2762
|
-
const _ =
|
2779
|
+
const _ = St(`${m}.value`, p.value, t, s, o, r);
|
2763
2780
|
_ !== void 0 && l.push(_);
|
2764
2781
|
} else {
|
2765
|
-
const _ =
|
2782
|
+
const _ = St(m, p, t, s, o, r);
|
2766
2783
|
_ !== void 0 && l.push(_);
|
2767
2784
|
}
|
2768
2785
|
}
|
@@ -2772,7 +2789,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2772
2789
|
items: l
|
2773
2790
|
};
|
2774
2791
|
} else {
|
2775
|
-
if (
|
2792
|
+
if (Ga(e))
|
2776
2793
|
return {
|
2777
2794
|
title: a,
|
2778
2795
|
prop: o,
|
@@ -2784,7 +2801,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2784
2801
|
const p = s.getScene(t.uuid);
|
2785
2802
|
if (p !== null) {
|
2786
2803
|
const m = p.getObjectByProperty("uuid", t.uuid);
|
2787
|
-
|
2804
|
+
q(m, `material.${o}`, u);
|
2788
2805
|
}
|
2789
2806
|
}
|
2790
2807
|
};
|
@@ -2800,7 +2817,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2800
2817
|
const p = s.getScene(t.uuid);
|
2801
2818
|
if (p !== null) {
|
2802
2819
|
const m = p.getObjectByProperty("uuid", t.uuid);
|
2803
|
-
|
2820
|
+
q(m, `material.${o}`, u);
|
2804
2821
|
}
|
2805
2822
|
}
|
2806
2823
|
};
|
@@ -2816,7 +2833,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2816
2833
|
const p = s.getScene(t.uuid);
|
2817
2834
|
if (p !== null) {
|
2818
2835
|
const m = p.getObjectByProperty("uuid", t.uuid);
|
2819
|
-
|
2836
|
+
q(m, `material.${o}`, u);
|
2820
2837
|
}
|
2821
2838
|
}
|
2822
2839
|
};
|
@@ -2832,7 +2849,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2832
2849
|
const p = s.getScene(t.uuid);
|
2833
2850
|
if (p !== null) {
|
2834
2851
|
const m = p.getObjectByProperty("uuid", t.uuid);
|
2835
|
-
|
2852
|
+
q(m, `material.${o}`, u);
|
2836
2853
|
}
|
2837
2854
|
}
|
2838
2855
|
};
|
@@ -2889,7 +2906,7 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2889
2906
|
const p = s.getScene(t.uuid);
|
2890
2907
|
if (p !== null) {
|
2891
2908
|
const m = p.getObjectByProperty("uuid", t.uuid);
|
2892
|
-
|
2909
|
+
q(m, `material.${o}`, u);
|
2893
2910
|
}
|
2894
2911
|
}
|
2895
2912
|
};
|
@@ -2900,10 +2917,10 @@ function wt(i, e, t, s, n = "", r = !1) {
|
|
2900
2917
|
const m = e[p];
|
2901
2918
|
if (m !== void 0)
|
2902
2919
|
if (m.value !== void 0) {
|
2903
|
-
const _ =
|
2920
|
+
const _ = St(`${p}.value`, m.value, t, s, o, u);
|
2904
2921
|
_ !== void 0 && l.push(_);
|
2905
2922
|
} else {
|
2906
|
-
const _ =
|
2923
|
+
const _ = St(p, m, t, s, o, u);
|
2907
2924
|
_ !== void 0 && l.push(_);
|
2908
2925
|
}
|
2909
2926
|
}
|
@@ -2930,9 +2947,9 @@ function os(i, e, t) {
|
|
2930
2947
|
else if (r === "number")
|
2931
2948
|
s.push(Za(n, a, e, t));
|
2932
2949
|
else if (r === "string")
|
2933
|
-
s.push(
|
2950
|
+
s.push(Wa(n, a, e, t));
|
2934
2951
|
else if (r === "object") {
|
2935
|
-
const o =
|
2952
|
+
const o = St(n, a, e, t);
|
2936
2953
|
o !== void 0 && s.push(o);
|
2937
2954
|
} else
|
2938
2955
|
a !== void 0 && console.log("other:", n, r, a);
|
@@ -2945,7 +2962,7 @@ function os(i, e, t) {
|
|
2945
2962
|
const n = t.getScene(e.uuid);
|
2946
2963
|
if (n !== null) {
|
2947
2964
|
const r = n.getObjectByProperty("uuid", e.uuid);
|
2948
|
-
|
2965
|
+
q(r, "material.needsUpdate", !0);
|
2949
2966
|
}
|
2950
2967
|
}
|
2951
2968
|
}), s;
|
@@ -3077,7 +3094,7 @@ function qa(i) {
|
|
3077
3094
|
}
|
3078
3095
|
function Gt(i) {
|
3079
3096
|
let e = i.value;
|
3080
|
-
e !== void 0 && (e.isColor !== void 0 ? e = ts(i.value) : i.type === "color" && (e = ts(new
|
3097
|
+
e !== void 0 && (e.isColor !== void 0 ? e = ts(i.value) : i.type === "color" && (e = ts(new Mt(i.value))));
|
3081
3098
|
const [t, s] = Z(e), n = ee(null), r = (l) => {
|
3082
3099
|
let u = l.target.value;
|
3083
3100
|
if (i.type === "boolean")
|
@@ -3093,7 +3110,7 @@ function Gt(i) {
|
|
3093
3110
|
const o = i.type === "string" && (t.length > 100 || t.search(`
|
3094
3111
|
`) > -1), c = o || i.type === "image" || i.type === "vector2";
|
3095
3112
|
return /* @__PURE__ */ d.jsxs("div", { className: `field ${c ? "block" : ""}`, style: a, children: [
|
3096
|
-
i.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children:
|
3113
|
+
i.type !== "button" && /* @__PURE__ */ d.jsx("label", { ref: n, children: $t(i.title) }, "fieldLabel"),
|
3097
3114
|
i.type === "string" && !o && /* @__PURE__ */ d.jsx(
|
3098
3115
|
"input",
|
3099
3116
|
{
|
@@ -3126,7 +3143,7 @@ function Gt(i) {
|
|
3126
3143
|
}
|
3127
3144
|
),
|
3128
3145
|
i.type === "number" && /* @__PURE__ */ d.jsx(
|
3129
|
-
|
3146
|
+
We,
|
3130
3147
|
{
|
3131
3148
|
value: t,
|
3132
3149
|
type: i.type,
|
@@ -3140,7 +3157,7 @@ function Gt(i) {
|
|
3140
3157
|
}
|
3141
3158
|
),
|
3142
3159
|
i.type === "range" && /* @__PURE__ */ d.jsx(
|
3143
|
-
|
3160
|
+
We,
|
3144
3161
|
{
|
3145
3162
|
value: t,
|
3146
3163
|
type: i.type,
|
@@ -3168,7 +3185,7 @@ function Gt(i) {
|
|
3168
3185
|
}
|
3169
3186
|
),
|
3170
3187
|
i.type === "image" && /* @__PURE__ */ d.jsx(qa, { title: i.title, prop: i.prop, value: i.value, onChange: i.onChange }),
|
3171
|
-
i.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: r, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, u) => /* @__PURE__ */ d.jsx("option", { value: l.value, children:
|
3188
|
+
i.type === "option" && /* @__PURE__ */ d.jsx(d.Fragment, { children: /* @__PURE__ */ d.jsx("select", { onChange: r, disabled: i.disabled, defaultValue: i.value, children: i.options?.map((l, u) => /* @__PURE__ */ d.jsx("option", { value: l.value, children: $t(l.title) }, u)) }) }),
|
3172
3189
|
i.type === "vector2" && /* @__PURE__ */ d.jsx(Da, { step: i.step, value: t, min: 0, max: 1, onChange: r }),
|
3173
3190
|
i.type === "grid3" && /* @__PURE__ */ d.jsx(rs, { step: i.step, value: t, onChange: r }),
|
3174
3191
|
i.type === "grid4" && /* @__PURE__ */ d.jsx(ka, { step: i.step, value: t, onChange: r }),
|
@@ -3178,7 +3195,7 @@ function Gt(i) {
|
|
3178
3195
|
function Ka(i) {
|
3179
3196
|
return "items" in i;
|
3180
3197
|
}
|
3181
|
-
class Ee extends
|
3198
|
+
class Ee extends ei {
|
3182
3199
|
subgroupNames = [];
|
3183
3200
|
subgroupElements = [];
|
3184
3201
|
valueOverrides = /* @__PURE__ */ new Map();
|
@@ -3232,7 +3249,7 @@ class Ee extends Jt {
|
|
3232
3249
|
return this.props.items.forEach((t) => {
|
3233
3250
|
if (Ka(t))
|
3234
3251
|
e.push(
|
3235
|
-
/* @__PURE__ */ d.jsx(Ee, { title:
|
3252
|
+
/* @__PURE__ */ d.jsx(Ee, { title: $t(t.title), items: t.items }, Math.random())
|
3236
3253
|
);
|
3237
3254
|
else {
|
3238
3255
|
const s = this.valueOverrides.get(t.title), n = s !== void 0 ? s : t.value;
|
@@ -3261,7 +3278,7 @@ class Ee extends Jt {
|
|
3261
3278
|
);
|
3262
3279
|
}
|
3263
3280
|
}), this.subgroupElements.forEach((t) => e.push(t)), /* @__PURE__ */ d.jsx(
|
3264
|
-
|
3281
|
+
qt,
|
3265
3282
|
{
|
3266
3283
|
label: this.props.title,
|
3267
3284
|
open: this.props.expanded === !0,
|
@@ -3273,19 +3290,19 @@ class Ee extends Jt {
|
|
3273
3290
|
);
|
3274
3291
|
}
|
3275
3292
|
}
|
3276
|
-
class
|
3293
|
+
class J extends ei {
|
3277
3294
|
static instance;
|
3278
3295
|
static groups = [];
|
3279
3296
|
static groupsRefs = [];
|
3280
3297
|
static groupTitles = [];
|
3281
3298
|
constructor(e) {
|
3282
|
-
super(e), this.state = { lastUpdate: Date.now() },
|
3299
|
+
super(e), this.state = { lastUpdate: Date.now() }, J.instance = this, D.addEventListener(A.ADD_GROUP, this.addGroup), D.addEventListener(A.REMOVE_GROUP, this.removeGroup);
|
3283
3300
|
}
|
3284
3301
|
componentWillUnmount() {
|
3285
3302
|
D.removeEventListener(A.ADD_GROUP, this.addGroup), D.removeEventListener(A.REMOVE_GROUP, this.removeGroup);
|
3286
3303
|
}
|
3287
3304
|
render() {
|
3288
|
-
return /* @__PURE__ */ d.jsx("div", { className: "customGroups", children:
|
3305
|
+
return /* @__PURE__ */ d.jsx("div", { className: "customGroups", children: J.groups }, this.state.lastUpdate);
|
3289
3306
|
}
|
3290
3307
|
// Events
|
3291
3308
|
addGroup = (e) => {
|
@@ -3305,7 +3322,7 @@ class q extends Jt {
|
|
3305
3322
|
this.props.three.updateGroup(t.title, r, a);
|
3306
3323
|
}
|
3307
3324
|
});
|
3308
|
-
}),
|
3325
|
+
}), J.groups.push(
|
3309
3326
|
/* @__PURE__ */ d.jsx(
|
3310
3327
|
Ee,
|
3311
3328
|
{
|
@@ -3314,13 +3331,13 @@ class q extends Jt {
|
|
3314
3331
|
},
|
3315
3332
|
Math.random()
|
3316
3333
|
)
|
3317
|
-
),
|
3334
|
+
), J.groupTitles.push(t.title), this.setState({ lastUpdate: Date.now() });
|
3318
3335
|
};
|
3319
3336
|
removeGroup = (e) => {
|
3320
|
-
const t = e.value, s =
|
3337
|
+
const t = e.value, s = J.groupTitles.length;
|
3321
3338
|
for (let n = 0; n < s; n++)
|
3322
|
-
if (t ===
|
3323
|
-
|
3339
|
+
if (t === J.groupTitles[n]) {
|
3340
|
+
J.groups.splice(n, 1), J.groupTitles.splice(n, 1), this.setState({ lastUpdate: Date.now() });
|
3324
3341
|
return;
|
3325
3342
|
}
|
3326
3343
|
};
|
@@ -3352,14 +3369,13 @@ class q extends Jt {
|
|
3352
3369
|
},
|
3353
3370
|
Math.random()
|
3354
3371
|
);
|
3355
|
-
return
|
3372
|
+
return J.groups.push(n), J.groupsRefs.push(s), J.groupTitles.push(e.title), s;
|
3356
3373
|
}
|
3357
3374
|
static removeEditorGroup(e) {
|
3358
|
-
const t =
|
3359
|
-
console.log("removeEditorGroup:", e, q.groupTitles);
|
3375
|
+
const t = J.groupTitles.length;
|
3360
3376
|
for (let s = 0; s < t; s++)
|
3361
|
-
if (e ===
|
3362
|
-
|
3377
|
+
if (e === J.groupTitles[s]) {
|
3378
|
+
J.groups.splice(s, 1), J.groupTitles.splice(s, 1), J.instance.setState({ lastUpdate: Date.now() });
|
3363
3379
|
return;
|
3364
3380
|
}
|
3365
3381
|
}
|
@@ -3415,7 +3431,7 @@ function Ja(i, e) {
|
|
3415
3431
|
const u = e.getScene(i.uuid);
|
3416
3432
|
if (u !== null) {
|
3417
3433
|
const p = u.getObjectByProperty("uuid", i.uuid);
|
3418
|
-
p !== void 0 && (
|
3434
|
+
p !== void 0 && (q(p, c, l), p.updateProjectionMatrix());
|
3419
3435
|
}
|
3420
3436
|
}
|
3421
3437
|
});
|
@@ -3432,7 +3448,7 @@ function Ja(i, e) {
|
|
3432
3448
|
const u = e.getScene(i.uuid);
|
3433
3449
|
if (u !== null) {
|
3434
3450
|
const p = u.getObjectByProperty("uuid", i.uuid);
|
3435
|
-
p !== void 0 && (
|
3451
|
+
p !== void 0 && (q(p, c, l), p.updateProjectionMatrix());
|
3436
3452
|
}
|
3437
3453
|
}
|
3438
3454
|
});
|
@@ -3455,7 +3471,7 @@ class er extends xe {
|
|
3455
3471
|
const r = new Ii({ fog: !1 });
|
3456
3472
|
super(n, r), this.light = e, this.color = t, this.type = "RectAreaLightHelper";
|
3457
3473
|
const a = [1, 1, 0, -1, 1, 0, -1, -1, 0, 1, 1, 0, -1, -1, 0, 1, -1, 0], o = new ot();
|
3458
|
-
o.setAttribute("position", new Ze(a, 3)), o.computeBoundingSphere(), this.add(new w(o, new
|
3474
|
+
o.setAttribute("position", new Ze(a, 3)), o.computeBoundingSphere(), this.add(new w(o, new Ge({ side: Is, fog: !1 })));
|
3459
3475
|
}
|
3460
3476
|
updateMatrixWorld() {
|
3461
3477
|
if (this.scale.set(0.5 * this.light.width, 0.5 * this.light.height, 1), this.color !== void 0)
|
@@ -3471,7 +3487,7 @@ class er extends xe {
|
|
3471
3487
|
this.geometry.dispose(), this.material.dispose(), this.children[0].geometry.dispose(), this.children[0].material.dispose();
|
3472
3488
|
}
|
3473
3489
|
}
|
3474
|
-
const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" },
|
3490
|
+
const hs = { type: "change" }, ki = { type: "start" }, on = { type: "end" }, jt = new Xn(), ds = new Qn(), tr = Math.cos(70 * $n.DEG2RAD), ie = new O(), ue = 2 * Math.PI, H = {
|
3475
3491
|
NONE: -1,
|
3476
3492
|
ROTATE: 0,
|
3477
3493
|
DOLLY: 1,
|
@@ -3543,7 +3559,7 @@ class ir extends Xs {
|
|
3543
3559
|
l.unproject(this.object), this.object.position.sub(l).add(o), this.object.updateMatrixWorld(), a = ie.length();
|
3544
3560
|
} else
|
3545
3561
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
3546
|
-
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (
|
3562
|
+
a !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(a).add(this.object.position) : (jt.origin.copy(this.object.position), jt.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(jt.direction)) < tr ? this.object.lookAt(this.target) : (ds.setFromNormalAndCoplanarPoint(this.object.up, this.target), jt.intersectPlane(ds, this.target))));
|
3547
3563
|
} else if (this.object.isOrthographicCamera) {
|
3548
3564
|
const a = this.object.zoom;
|
3549
3565
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), a !== this.object.zoom && (this.object.updateProjectionMatrix(), r = !0);
|
@@ -3912,7 +3928,7 @@ function mr(i) {
|
|
3912
3928
|
* (c) 2017 @yomotsu
|
3913
3929
|
* Released under the MIT License.
|
3914
3930
|
*/
|
3915
|
-
const
|
3931
|
+
const G = {
|
3916
3932
|
LEFT: 1,
|
3917
3933
|
RIGHT: 2,
|
3918
3934
|
MIDDLE: 4
|
@@ -3945,7 +3961,7 @@ function Fe(i) {
|
|
3945
3961
|
function Re(i) {
|
3946
3962
|
return i.isOrthographicCamera;
|
3947
3963
|
}
|
3948
|
-
const tt = Math.PI * 2, us = Math.PI / 2, ln = 1e-5,
|
3964
|
+
const tt = Math.PI * 2, us = Math.PI / 2, ln = 1e-5, _t = Math.PI / 180;
|
3949
3965
|
function ye(i, e, t) {
|
3950
3966
|
return Math.max(e, Math.min(t, i));
|
3951
3967
|
}
|
@@ -3958,13 +3974,13 @@ function z(i, e, t = ln) {
|
|
3958
3974
|
function ps(i, e) {
|
3959
3975
|
return Math.round(i / e) * e;
|
3960
3976
|
}
|
3961
|
-
function
|
3977
|
+
function vt(i) {
|
3962
3978
|
return isFinite(i) ? i : i < 0 ? -Number.MAX_VALUE : Number.MAX_VALUE;
|
3963
3979
|
}
|
3964
|
-
function
|
3980
|
+
function yt(i) {
|
3965
3981
|
return Math.abs(i) < Number.MAX_VALUE ? i : i * (1 / 0);
|
3966
3982
|
}
|
3967
|
-
function
|
3983
|
+
function Nt(i, e, t, s, n = 1 / 0, r) {
|
3968
3984
|
s = Math.max(1e-4, s);
|
3969
3985
|
const a = 2 / s, o = a * r, c = 1 / (1 + o + 0.48 * o * o + 0.235 * o * o * o);
|
3970
3986
|
let l = i - e;
|
@@ -4063,8 +4079,8 @@ class fr {
|
|
4063
4079
|
}
|
4064
4080
|
}
|
4065
4081
|
var fi;
|
4066
|
-
const gr = "2.9.0",
|
4067
|
-
let R, fs,
|
4082
|
+
const gr = "2.9.0", Ft = 1 / 8, _r = /Mac/.test((fi = globalThis?.navigator) === null || fi === void 0 ? void 0 : fi.platform);
|
4083
|
+
let R, fs, zt, gi, pe, L, N, it, bt, Ce, we, ze, gs, _s, ve, Et, st, vs, _i, ys, vi, yi, Ht;
|
4068
4084
|
class Oe extends fr {
|
4069
4085
|
/**
|
4070
4086
|
* Injects THREE as the dependency. You can then proceed to use CameraControls.
|
@@ -4107,7 +4123,7 @@ class Oe extends fr {
|
|
4107
4123
|
* @category Statics
|
4108
4124
|
*/
|
4109
4125
|
static install(e) {
|
4110
|
-
R = e.THREE, fs = Object.freeze(new R.Vector3(0, 0, 0)),
|
4126
|
+
R = e.THREE, fs = Object.freeze(new R.Vector3(0, 0, 0)), zt = Object.freeze(new R.Vector3(0, 1, 0)), gi = Object.freeze(new R.Vector3(0, 0, 1)), pe = new R.Vector2(), L = new R.Vector3(), N = new R.Vector3(), it = new R.Vector3(), bt = new R.Vector3(), Ce = new R.Vector3(), we = new R.Vector3(), ze = new R.Vector3(), gs = new R.Vector3(), _s = new R.Vector3(), ve = new R.Spherical(), Et = new R.Spherical(), st = new R.Box3(), vs = new R.Box3(), _i = new R.Sphere(), ys = new R.Quaternion(), vi = new R.Quaternion(), yi = new R.Matrix4(), Ht = new R.Raycaster();
|
4111
4127
|
}
|
4112
4128
|
/**
|
4113
4129
|
* list all ACTIONs
|
@@ -4138,7 +4154,7 @@ class Oe extends fr {
|
|
4138
4154
|
}, this._enabled = !0, this._state = f.NONE, this._viewport = null, this._changedDolly = 0, this._changedZoom = 0, this._hasRested = !0, this._boundaryEnclosesCamera = !1, this._needsUpdate = !0, this._updatedLastTime = !1, this._elementRect = new DOMRect(), this._isDragging = !1, this._dragNeedsUpdate = !0, this._activePointers = [], this._lockedPointer = null, this._interactiveArea = new DOMRect(0, 0, 1, 1), this._isUserControllingRotate = !1, this._isUserControllingDolly = !1, this._isUserControllingTruck = !1, this._isUserControllingOffset = !1, this._isUserControllingZoom = !1, this._lastDollyDirection = et.NONE, this._thetaVelocity = { value: 0 }, this._phiVelocity = { value: 0 }, this._radiusVelocity = { value: 0 }, this._targetVelocity = new R.Vector3(), this._focalOffsetVelocity = new R.Vector3(), this._zoomVelocity = { value: 0 }, this._truckInternal = (g, v, E) => {
|
4139
4155
|
let b, P;
|
4140
4156
|
if (Fe(this._camera)) {
|
4141
|
-
const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() *
|
4157
|
+
const x = L.copy(this._camera.position).sub(this._target), j = this._camera.getEffectiveFOV() * _t, X = x.length() * Math.tan(j * 0.5);
|
4142
4158
|
b = this.truckSpeed * g * X / this._elementRect.height, P = this.truckSpeed * v * X / this._elementRect.height;
|
4143
4159
|
} else if (Re(this._camera)) {
|
4144
4160
|
const x = this._camera;
|
@@ -4155,7 +4171,7 @@ class Oe extends fr {
|
|
4155
4171
|
}, this._zoomInternal = (g, v, E) => {
|
4156
4172
|
const b = Math.pow(0.95, g * this.dollySpeed), P = this._zoom, x = this._zoom * b;
|
4157
4173
|
this.zoomTo(x, !0), this.dollyToCursor && (this._changedZoom += x - P, this._dollyControlCoord.set(v, E));
|
4158
|
-
}, typeof R > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new R.Quaternion().setFromUnitVectors(this._camera.up,
|
4174
|
+
}, typeof R > "u" && console.error("camera-controls: `THREE` is undefined. You must first run `CameraControls.install( { THREE: THREE } )`. Check the docs for further information."), this._camera = e, this._yAxisUpSpace = new R.Quaternion().setFromUnitVectors(this._camera.up, zt), this._yAxisUpSpaceInverse = this._yAxisUpSpace.clone().invert(), this._state = f.NONE, this._target = new R.Vector3(), this._targetEnd = this._target.clone(), this._focalOffset = new R.Vector3(), this._focalOffsetEnd = this._focalOffset.clone(), this._spherical = new R.Spherical().setFromVector3(L.copy(this._camera.position).applyQuaternion(this._yAxisUpSpace)), this._sphericalEnd = this._spherical.clone(), this._lastDistance = this._spherical.radius, this._zoom = this._camera.zoom, this._zoomEnd = this._zoom, this._lastZoom = this._zoom, this._nearPlaneCorners = [
|
4159
4175
|
new R.Vector3(),
|
4160
4176
|
new R.Vector3(),
|
4161
4177
|
new R.Vector3(),
|
@@ -4178,12 +4194,12 @@ class Oe extends fr {
|
|
4178
4194
|
if (P < this._interactiveArea.left || P > this._interactiveArea.right || x < this._interactiveArea.top || x > this._interactiveArea.bottom)
|
4179
4195
|
return;
|
4180
4196
|
}
|
4181
|
-
const v = g.pointerType !== "mouse" ? null : (g.buttons &
|
4197
|
+
const v = g.pointerType !== "mouse" ? null : (g.buttons & G.LEFT) === G.LEFT ? G.LEFT : (g.buttons & G.MIDDLE) === G.MIDDLE ? G.MIDDLE : (g.buttons & G.RIGHT) === G.RIGHT ? G.RIGHT : null;
|
4182
4198
|
if (v !== null) {
|
4183
4199
|
const b = this._findPointerByMouseButton(v);
|
4184
4200
|
b && this._disposePointer(b);
|
4185
4201
|
}
|
4186
|
-
if ((g.buttons &
|
4202
|
+
if ((g.buttons & G.LEFT) === G.LEFT && this._lockedPointer)
|
4187
4203
|
return;
|
4188
4204
|
const E = {
|
4189
4205
|
pointerId: g.pointerId,
|
@@ -4211,7 +4227,7 @@ class Oe extends fr {
|
|
4211
4227
|
break;
|
4212
4228
|
}
|
4213
4229
|
else
|
4214
|
-
(!this._isDragging && this._lockedPointer || this._isDragging && (g.buttons &
|
4230
|
+
(!this._isDragging && this._lockedPointer || this._isDragging && (g.buttons & G.LEFT) === G.LEFT) && (this._state = this._state | this.mouseButtons.left), this._isDragging && (g.buttons & G.MIDDLE) === G.MIDDLE && (this._state = this._state | this.mouseButtons.middle), this._isDragging && (g.buttons & G.RIGHT) === G.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
4215
4231
|
_();
|
4216
4232
|
}
|
4217
4233
|
}, c = (g) => {
|
@@ -4307,7 +4323,7 @@ class Oe extends fr {
|
|
4307
4323
|
break;
|
4308
4324
|
}
|
4309
4325
|
else
|
4310
|
-
!this._lockedPointer && (g.buttons &
|
4326
|
+
!this._lockedPointer && (g.buttons & G.LEFT) === G.LEFT && (this._state = this._state | this.mouseButtons.left), (g.buttons & G.MIDDLE) === G.MIDDLE && (this._state = this._state | this.mouseButtons.middle), (g.buttons & G.RIGHT) === G.RIGHT && (this._state = this._state | this.mouseButtons.right);
|
4311
4327
|
((this._state & f.ROTATE) === f.ROTATE || (this._state & f.TOUCH_ROTATE) === f.TOUCH_ROTATE || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) && (this._sphericalEnd.theta = this._spherical.theta, this._sphericalEnd.phi = this._spherical.phi, this._thetaVelocity.value = 0, this._phiVelocity.value = 0), ((this._state & f.TRUCK) === f.TRUCK || (this._state & f.TOUCH_TRUCK) === f.TOUCH_TRUCK || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK) && (this._targetEnd.copy(this._target), this._targetVelocity.set(0, 0, 0)), ((this._state & f.DOLLY) === f.DOLLY || (this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE) && (this._sphericalEnd.radius = this._spherical.radius, this._radiusVelocity.value = 0), ((this._state & f.ZOOM) === f.ZOOM || (this._state & f.TOUCH_ZOOM) === f.TOUCH_ZOOM || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) && (this._zoomEnd = this._zoom, this._zoomVelocity.value = 0), ((this._state & f.OFFSET) === f.OFFSET || (this._state & f.TOUCH_OFFSET) === f.TOUCH_OFFSET || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET) && (this._focalOffsetEnd.copy(this._focalOffset), this._focalOffsetVelocity.set(0, 0, 0)), this.dispatchEvent({ type: "controlstart" });
|
4312
4328
|
}, _ = () => {
|
4313
4329
|
if (!this._enabled || !this._dragNeedsUpdate)
|
@@ -4316,13 +4332,13 @@ class Oe extends fr {
|
|
4316
4332
|
const v = this._domElement && this._domElement.ownerDocument.pointerLockElement === this._domElement ? this._lockedPointer || this._activePointers[0] : null, E = v ? -v.deltaX : n.x - pe.x, b = v ? -v.deltaY : n.y - pe.y;
|
4317
4333
|
if (n.copy(pe), ((this._state & f.ROTATE) === f.ROTATE || (this._state & f.TOUCH_ROTATE) === f.TOUCH_ROTATE || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) && (this._rotateInternal(E, b), this._isUserControllingRotate = !0), (this._state & f.DOLLY) === f.DOLLY || (this._state & f.ZOOM) === f.ZOOM) {
|
4318
4334
|
const P = this.dollyToCursor ? (s.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, x = this.dollyToCursor ? (s.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0, j = this.dollyDragInverted ? -1 : 1;
|
4319
|
-
(this._state & f.DOLLY) === f.DOLLY ? (this._dollyInternal(j * b *
|
4335
|
+
(this._state & f.DOLLY) === f.DOLLY ? (this._dollyInternal(j * b * Ft, P, x), this._isUserControllingDolly = !0) : (this._zoomInternal(j * b * Ft, P, x), this._isUserControllingZoom = !0);
|
4320
4336
|
}
|
4321
4337
|
if ((this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_ZOOM) === f.TOUCH_ZOOM || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_ZOOM_ROTATE) === f.TOUCH_ZOOM_ROTATE) {
|
4322
4338
|
const P = pe.x - this._activePointers[1].clientX, x = pe.y - this._activePointers[1].clientY, j = Math.sqrt(P * P + x * x), X = r.y - j;
|
4323
4339
|
r.set(0, j);
|
4324
4340
|
const ge = this.dollyToCursor ? (n.x - this._elementRect.x) / this._elementRect.width * 2 - 1 : 0, Ae = this.dollyToCursor ? (n.y - this._elementRect.y) / this._elementRect.height * -2 + 1 : 0;
|
4325
|
-
(this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(X *
|
4341
|
+
(this._state & f.TOUCH_DOLLY) === f.TOUCH_DOLLY || (this._state & f.TOUCH_DOLLY_ROTATE) === f.TOUCH_DOLLY_ROTATE || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET ? (this._dollyInternal(X * Ft, ge, Ae), this._isUserControllingDolly = !0) : (this._zoomInternal(X * Ft, ge, Ae), this._isUserControllingZoom = !0);
|
4326
4342
|
}
|
4327
4343
|
((this._state & f.TRUCK) === f.TRUCK || (this._state & f.TOUCH_TRUCK) === f.TOUCH_TRUCK || (this._state & f.TOUCH_DOLLY_TRUCK) === f.TOUCH_DOLLY_TRUCK || (this._state & f.TOUCH_ZOOM_TRUCK) === f.TOUCH_ZOOM_TRUCK) && (this._truckInternal(E, b, !1), this._isUserControllingTruck = !0), ((this._state & f.OFFSET) === f.OFFSET || (this._state & f.TOUCH_OFFSET) === f.TOUCH_OFFSET || (this._state & f.TOUCH_DOLLY_OFFSET) === f.TOUCH_DOLLY_OFFSET || (this._state & f.TOUCH_ZOOM_OFFSET) === f.TOUCH_ZOOM_OFFSET) && (this._truckInternal(E, b, !0), this._isUserControllingOffset = !0), this.dispatchEvent({ type: "control" });
|
4328
4344
|
}, S = () => {
|
@@ -4607,7 +4623,7 @@ class Oe extends fr {
|
|
4607
4623
|
* @category Methods
|
4608
4624
|
*/
|
4609
4625
|
dollyInFixed(e, t = !1) {
|
4610
|
-
this._targetEnd.add(this._getCameraDirection(
|
4626
|
+
this._targetEnd.add(this._getCameraDirection(bt).multiplyScalar(e)), t || this._target.copy(this._targetEnd);
|
4611
4627
|
const s = !t || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold);
|
4612
4628
|
return this._createOnRestPromise(s);
|
4613
4629
|
}
|
@@ -4719,7 +4735,7 @@ class Oe extends fr {
|
|
4719
4735
|
const u = ps(this._sphericalEnd.theta, us), p = ps(this._sphericalEnd.phi, us);
|
4720
4736
|
c.push(this.rotateTo(u, p, t));
|
4721
4737
|
const m = L.setFromSpherical(this._sphericalEnd).normalize(), _ = ys.setFromUnitVectors(m, gi), S = z(Math.abs(m.y), 1);
|
4722
|
-
S && _.multiply(vi.setFromAxisAngle(
|
4738
|
+
S && _.multiply(vi.setFromAxisAngle(zt, u)), _.multiply(this._yAxisUpSpaceInverse);
|
4723
4739
|
const T = vs.makeEmpty();
|
4724
4740
|
N.copy(l.min).applyQuaternion(_), T.expandByPoint(N), N.copy(l.min).setX(l.max.x).applyQuaternion(_), T.expandByPoint(N), N.copy(l.min).setY(l.max.y).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).setZ(l.min.z).applyQuaternion(_), T.expandByPoint(N), N.copy(l.min).setZ(l.max.z).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).setY(l.min.y).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).setX(l.min.x).applyQuaternion(_), T.expandByPoint(N), N.copy(l.max).applyQuaternion(_), T.expandByPoint(N), T.min.x -= n, T.min.y -= a, T.max.x += r, T.max.y += o, _.setFromUnitVectors(gi, m), S && _.premultiply(vi.invert()), _.premultiply(this._yAxisUpSpace);
|
4725
4741
|
const M = T.getSize(L), g = T.getCenter(N).applyQuaternion(_);
|
@@ -4790,8 +4806,8 @@ class Oe extends fr {
|
|
4790
4806
|
const T = L.set(n, r, a), M = N.set(e, t, s);
|
4791
4807
|
ve.setFromVector3(M.sub(T).applyQuaternion(this._yAxisUpSpace));
|
4792
4808
|
const g = it.set(u, p, m), v = N.set(o, c, l);
|
4793
|
-
|
4794
|
-
const E =
|
4809
|
+
Et.setFromVector3(v.sub(g).applyQuaternion(this._yAxisUpSpace)), this._targetEnd.copy(T.lerp(g, _));
|
4810
|
+
const E = Et.theta - ve.theta, b = Et.phi - ve.phi, P = Et.radius - ve.radius;
|
4795
4811
|
this._sphericalEnd.set(ve.radius + P * _, ve.phi + b * _, ve.theta + E * _), this.normalizeRotations(), this._needsUpdate = !0, S || (this._target.copy(this._targetEnd), this._spherical.copy(this._sphericalEnd));
|
4796
4812
|
const x = !S || z(this._target.x, this._targetEnd.x, this.restThreshold) && z(this._target.y, this._targetEnd.y, this.restThreshold) && z(this._target.z, this._targetEnd.z, this.restThreshold) && z(this._spherical.theta, this._sphericalEnd.theta, this.restThreshold) && z(this._spherical.phi, this._sphericalEnd.phi, this.restThreshold) && z(this._spherical.radius, this._sphericalEnd.radius, this.restThreshold);
|
4797
4813
|
return this._createOnRestPromise(x);
|
@@ -4886,7 +4902,7 @@ class Oe extends fr {
|
|
4886
4902
|
getDistanceToFitBox(e, t, s, n = !1) {
|
4887
4903
|
if (mi(this._camera, "getDistanceToFitBox"))
|
4888
4904
|
return this._spherical.radius;
|
4889
|
-
const r = e / t, a = this._camera.getEffectiveFOV() *
|
4905
|
+
const r = e / t, a = this._camera.getEffectiveFOV() * _t, o = this._camera.aspect;
|
4890
4906
|
return ((n ? r > o : r < o) ? t : e / o) * 0.5 / Math.tan(a * 0.5) + s * 0.5;
|
4891
4907
|
}
|
4892
4908
|
/**
|
@@ -4898,7 +4914,7 @@ class Oe extends fr {
|
|
4898
4914
|
getDistanceToFitSphere(e) {
|
4899
4915
|
if (mi(this._camera, "getDistanceToFitSphere"))
|
4900
4916
|
return this._spherical.radius;
|
4901
|
-
const t = this._camera.getEffectiveFOV() *
|
4917
|
+
const t = this._camera.getEffectiveFOV() * _t, s = Math.atan(Math.tan(t * 0.5) * this._camera.aspect) * 2, n = 1 < this._camera.aspect ? t : s;
|
4902
4918
|
return e / Math.sin(n * 0.5);
|
4903
4919
|
}
|
4904
4920
|
/**
|
@@ -4981,7 +4997,7 @@ class Oe extends fr {
|
|
4981
4997
|
* @category Methods
|
4982
4998
|
*/
|
4983
4999
|
updateCameraUp() {
|
4984
|
-
this._yAxisUpSpace.setFromUnitVectors(this._camera.up,
|
5000
|
+
this._yAxisUpSpace.setFromUnitVectors(this._camera.up, zt), this._yAxisUpSpaceInverse.copy(this._yAxisUpSpace).invert();
|
4985
5001
|
}
|
4986
5002
|
/**
|
4987
5003
|
* Apply current camera-up direction to the camera.
|
@@ -5007,19 +5023,19 @@ class Oe extends fr {
|
|
5007
5023
|
this._thetaVelocity.value = 0, this._spherical.theta = this._sphericalEnd.theta;
|
5008
5024
|
else {
|
5009
5025
|
const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
5010
|
-
this._spherical.theta =
|
5026
|
+
this._spherical.theta = Nt(this._spherical.theta, this._sphericalEnd.theta, this._thetaVelocity, p, 1 / 0, e), this._needsUpdate = !0;
|
5011
5027
|
}
|
5012
5028
|
if (V(s))
|
5013
5029
|
this._phiVelocity.value = 0, this._spherical.phi = this._sphericalEnd.phi;
|
5014
5030
|
else {
|
5015
5031
|
const p = this._isUserControllingRotate ? this.draggingSmoothTime : this.smoothTime;
|
5016
|
-
this._spherical.phi =
|
5032
|
+
this._spherical.phi = Nt(this._spherical.phi, this._sphericalEnd.phi, this._phiVelocity, p, 1 / 0, e), this._needsUpdate = !0;
|
5017
5033
|
}
|
5018
5034
|
if (V(n))
|
5019
5035
|
this._radiusVelocity.value = 0, this._spherical.radius = this._sphericalEnd.radius;
|
5020
5036
|
else {
|
5021
5037
|
const p = this._isUserControllingDolly ? this.draggingSmoothTime : this.smoothTime;
|
5022
|
-
this._spherical.radius =
|
5038
|
+
this._spherical.radius = Nt(this._spherical.radius, this._sphericalEnd.radius, this._radiusVelocity, p, this.maxSpeed, e), this._needsUpdate = !0;
|
5023
5039
|
}
|
5024
5040
|
if (V(r.x) && V(r.y) && V(r.z))
|
5025
5041
|
this._targetVelocity.set(0, 0, 0), this._target.copy(this._targetEnd);
|
@@ -5037,13 +5053,13 @@ class Oe extends fr {
|
|
5037
5053
|
this._zoomVelocity.value = 0, this._zoom = this._zoomEnd;
|
5038
5054
|
else {
|
5039
5055
|
const p = this._isUserControllingZoom ? this.draggingSmoothTime : this.smoothTime;
|
5040
|
-
this._zoom =
|
5056
|
+
this._zoom = Nt(this._zoom, this._zoomEnd, this._zoomVelocity, p, 1 / 0, e);
|
5041
5057
|
}
|
5042
5058
|
if (this.dollyToCursor) {
|
5043
5059
|
if (Fe(this._camera) && this._changedDolly !== 0) {
|
5044
|
-
const p = this._spherical.radius - this._lastDistance, m = this._camera, _ = this._getCameraDirection(
|
5060
|
+
const p = this._spherical.radius - this._lastDistance, m = this._camera, _ = this._getCameraDirection(bt), S = L.copy(_).cross(m.up).normalize();
|
5045
5061
|
S.lengthSq() === 0 && (S.x = 1);
|
5046
|
-
const T = N.crossVectors(S, _), M = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() *
|
5062
|
+
const T = N.crossVectors(S, _), M = this._sphericalEnd.radius * Math.tan(m.getEffectiveFOV() * _t * 0.5), v = (this._sphericalEnd.radius - p - this._sphericalEnd.radius) / this._sphericalEnd.radius, E = it.copy(this._targetEnd).add(S.multiplyScalar(this._dollyControlCoord.x * M * m.aspect)).add(T.multiplyScalar(this._dollyControlCoord.y * M)), b = L.copy(this._targetEnd).lerp(E, v), P = this._lastDollyDirection === et.IN && this._spherical.radius <= this.minDistance, x = this._lastDollyDirection === et.OUT && this.maxDistance <= this._spherical.radius;
|
5047
5063
|
if (this.infinityDolly && (P || x)) {
|
5048
5064
|
this._sphericalEnd.radius -= p, this._spherical.radius -= p;
|
5049
5065
|
const X = N.copy(_).multiplyScalar(-p);
|
@@ -5053,7 +5069,7 @@ class Oe extends fr {
|
|
5053
5069
|
const j = N.subVectors(b, this._targetEnd);
|
5054
5070
|
this._targetEnd.copy(b), this._target.add(j), this._changedDolly -= p, V(this._changedDolly) && (this._changedDolly = 0);
|
5055
5071
|
} else if (Re(this._camera) && this._changedZoom !== 0) {
|
5056
|
-
const p = this._zoom - this._lastZoom, m = this._camera, _ = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), S = N.set(0, 0, -1).applyQuaternion(m.quaternion), T = it.copy(_).add(S.multiplyScalar(-_.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, v = this._getCameraDirection(
|
5072
|
+
const p = this._zoom - this._lastZoom, m = this._camera, _ = L.set(this._dollyControlCoord.x, this._dollyControlCoord.y, (m.near + m.far) / (m.near - m.far)).unproject(m), S = N.set(0, 0, -1).applyQuaternion(m.quaternion), T = it.copy(_).add(S.multiplyScalar(-_.dot(m.up))), g = -(this._zoom - p - this._zoom) / this._zoom, v = this._getCameraDirection(bt), E = this._targetEnd.dot(v), b = L.copy(this._targetEnd).lerp(T, g), P = b.dot(v), x = v.multiplyScalar(P - E);
|
5057
5073
|
b.sub(x), this._boundary.clampPoint(b, b);
|
5058
5074
|
const j = N.subVectors(b, this._targetEnd);
|
5059
5075
|
this._targetEnd.copy(b), this._target.add(j), this._changedZoom -= p, V(this._changedZoom) && (this._changedZoom = 0);
|
@@ -5073,13 +5089,13 @@ class Oe extends fr {
|
|
5073
5089
|
return JSON.stringify({
|
5074
5090
|
enabled: this._enabled,
|
5075
5091
|
minDistance: this.minDistance,
|
5076
|
-
maxDistance:
|
5092
|
+
maxDistance: vt(this.maxDistance),
|
5077
5093
|
minZoom: this.minZoom,
|
5078
|
-
maxZoom:
|
5094
|
+
maxZoom: vt(this.maxZoom),
|
5079
5095
|
minPolarAngle: this.minPolarAngle,
|
5080
|
-
maxPolarAngle:
|
5081
|
-
minAzimuthAngle:
|
5082
|
-
maxAzimuthAngle:
|
5096
|
+
maxPolarAngle: vt(this.maxPolarAngle),
|
5097
|
+
minAzimuthAngle: vt(this.minAzimuthAngle),
|
5098
|
+
maxAzimuthAngle: vt(this.maxAzimuthAngle),
|
5083
5099
|
smoothTime: this.smoothTime,
|
5084
5100
|
draggingSmoothTime: this.draggingSmoothTime,
|
5085
5101
|
dollySpeed: this.dollySpeed,
|
@@ -5104,7 +5120,7 @@ class Oe extends fr {
|
|
5104
5120
|
*/
|
5105
5121
|
fromJSON(e, t = !1) {
|
5106
5122
|
const s = JSON.parse(e);
|
5107
|
-
this.enabled = s.enabled, this.minDistance = s.minDistance, this.maxDistance =
|
5123
|
+
this.enabled = s.enabled, this.minDistance = s.minDistance, this.maxDistance = yt(s.maxDistance), this.minZoom = s.minZoom, this.maxZoom = yt(s.maxZoom), this.minPolarAngle = s.minPolarAngle, this.maxPolarAngle = yt(s.maxPolarAngle), this.minAzimuthAngle = yt(s.minAzimuthAngle), this.maxAzimuthAngle = yt(s.maxAzimuthAngle), this.smoothTime = s.smoothTime, this.draggingSmoothTime = s.draggingSmoothTime, this.dollySpeed = s.dollySpeed, this.truckSpeed = s.truckSpeed, this.dollyToCursor = s.dollyToCursor, this.verticalDragToForward = s.verticalDragToForward, this._target0.fromArray(s.target0), this._position0.fromArray(s.position0), this._zoom0 = s.zoom0, this._focalOffset0.fromArray(s.focalOffset0), this.moveTo(s.target[0], s.target[1], s.target[2], t), ve.setFromVector3(L.fromArray(s.position).sub(this._targetEnd).applyQuaternion(this._yAxisUpSpace)), this.rotateTo(ve.theta, ve.phi, t), this.dollyTo(ve.radius, t), this.zoomTo(s.zoom, t), this.setFocalOffset(s.focalOffset[0], s.focalOffset[1], s.focalOffset[2], t), this._needsUpdate = !0;
|
5108
5124
|
}
|
5109
5125
|
/**
|
5110
5126
|
* Attach all internal event handlers to enable drag control.
|
@@ -5165,7 +5181,7 @@ class Oe extends fr {
|
|
5165
5181
|
}
|
5166
5182
|
_updateNearPlaneCorners() {
|
5167
5183
|
if (Fe(this._camera)) {
|
5168
|
-
const e = this._camera, t = e.near, s = e.getEffectiveFOV() *
|
5184
|
+
const e = this._camera, t = e.near, s = e.getEffectiveFOV() * _t, n = Math.tan(s * 0.5) * t, r = n * e.aspect;
|
5169
5185
|
this._nearPlaneCorners[0].set(-r, -n, 0), this._nearPlaneCorners[1].set(r, -n, 0), this._nearPlaneCorners[2].set(r, n, 0), this._nearPlaneCorners[3].set(-r, n, 0);
|
5170
5186
|
} else if (Re(this._camera)) {
|
5171
5187
|
const e = this._camera, t = 1 / e.zoom, s = e.left * t, n = e.right * t, r = e.top * t, a = e.bottom * t;
|
@@ -5177,14 +5193,14 @@ class Oe extends fr {
|
|
5177
5193
|
let e = 1 / 0;
|
5178
5194
|
if (!(this.colliderMeshes.length >= 1) || mi(this._camera, "_collisionTest"))
|
5179
5195
|
return e;
|
5180
|
-
const s = this._getTargetDirection(
|
5196
|
+
const s = this._getTargetDirection(bt);
|
5181
5197
|
yi.lookAt(fs, s, this._camera.up);
|
5182
5198
|
for (let n = 0; n < 4; n++) {
|
5183
5199
|
const r = N.copy(this._nearPlaneCorners[n]);
|
5184
5200
|
r.applyMatrix4(yi);
|
5185
5201
|
const a = it.addVectors(this._target, r);
|
5186
|
-
|
5187
|
-
const o =
|
5202
|
+
Ht.set(a, s), Ht.far = this._spherical.radius + 1;
|
5203
|
+
const o = Ht.intersectObjects(this.colliderMeshes);
|
5188
5204
|
o.length !== 0 && o[0].distance < e && (e = o[0].distance);
|
5189
5205
|
}
|
5190
5206
|
return e;
|
@@ -5260,7 +5276,7 @@ class Oe extends fr {
|
|
5260
5276
|
}), s.radius = Math.sqrt(r), s;
|
5261
5277
|
}
|
5262
5278
|
}
|
5263
|
-
const
|
5279
|
+
const Kt = (i) => {
|
5264
5280
|
const [e, t] = Z(i.options[i.index]), s = () => {
|
5265
5281
|
i.onToggle(!i.open);
|
5266
5282
|
}, n = (r) => {
|
@@ -5284,7 +5300,7 @@ const qt = (i) => {
|
|
5284
5300
|
} }),
|
5285
5301
|
/* @__PURE__ */ d.jsxs("div", { className: "options", children: [
|
5286
5302
|
e.camera !== null && /* @__PURE__ */ d.jsx(
|
5287
|
-
|
5303
|
+
Kt,
|
5288
5304
|
{
|
5289
5305
|
title: "Camera",
|
5290
5306
|
index: e.options.indexOf(e.camera.name),
|
@@ -5298,7 +5314,7 @@ const qt = (i) => {
|
|
5298
5314
|
}
|
5299
5315
|
),
|
5300
5316
|
/* @__PURE__ */ d.jsx(
|
5301
|
-
|
5317
|
+
Kt,
|
5302
5318
|
{
|
5303
5319
|
title: "Mode",
|
5304
5320
|
index: s.indexOf(n),
|
@@ -5337,7 +5353,7 @@ class vr extends Qs {
|
|
5337
5353
|
value: e?.divisions !== void 0 ? e?.divisions : 10
|
5338
5354
|
},
|
5339
5355
|
uColor: {
|
5340
|
-
value: e?.color !== void 0 ? e?.color : new
|
5356
|
+
value: e?.color !== void 0 ? e?.color : new Mt(16777215)
|
5341
5357
|
},
|
5342
5358
|
uDistance: {
|
5343
5359
|
value: e?.distance !== void 0 ? e?.distance : 1e4
|
@@ -5511,7 +5527,7 @@ class Cr extends Qs {
|
|
5511
5527
|
});
|
5512
5528
|
}
|
5513
5529
|
}
|
5514
|
-
const Ye = new
|
5530
|
+
const Ye = new Qt(), re = new O(), De = new O(), W = new fe(), Es = {
|
5515
5531
|
X: new O(1, 0, 0),
|
5516
5532
|
Y: new O(0, 1, 0),
|
5517
5533
|
Z: new O(0, 0, 1)
|
@@ -5573,7 +5589,7 @@ class wr extends Xs {
|
|
5573
5589
|
const a = Ei(this._plane, Ye, !0);
|
5574
5590
|
if (a) {
|
5575
5591
|
if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), s === "translate")
|
5576
|
-
this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (n.position.applyQuaternion(
|
5592
|
+
this._offset.copy(this.pointEnd).sub(this.pointStart), r === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), r === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), n.position.copy(this._offset).add(this._positionStart), this.translationSnap && (r === "local" && (n.position.applyQuaternion(W.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.position.applyQuaternion(this._quaternionStart)), r === "world" && (n.parent && n.position.add(re.setFromMatrixPosition(n.parent.matrixWorld)), t.search("X") !== -1 && (n.position.x = Math.round(n.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (n.position.y = Math.round(n.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (n.position.z = Math.round(n.position.z / this.translationSnap) * this.translationSnap), n.parent && n.position.sub(re.setFromMatrixPosition(n.parent.matrixWorld))));
|
5577
5593
|
else if (s === "scale") {
|
5578
5594
|
if (t.search("XYZ") !== -1) {
|
5579
5595
|
let o = this.pointEnd.length() / this.pointStart.length();
|
@@ -5585,7 +5601,7 @@ class wr extends Xs {
|
|
5585
5601
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
5586
5602
|
const o = 20 / this.worldPosition.distanceTo(re.setFromMatrixPosition(this.camera.matrixWorld));
|
5587
5603
|
let c = !1;
|
5588
|
-
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Es[t]), re.copy(Es[t]), r === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(
|
5604
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(re.copy(this.rotationAxis).cross(this.eye)) * o) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(Es[t]), re.copy(Es[t]), r === "local" && re.applyQuaternion(this.worldQuaternion), re.cross(this.eye), re.length() === 0 ? c = !0 : this.rotationAngle = this._offset.dot(re.normalize()) * o), (t === "E" || c) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), r === "local" && t !== "E" && t !== "XYZE" ? (n.quaternion.copy(this._quaternionStart), n.quaternion.multiply(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), n.quaternion.copy(W.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), n.quaternion.multiply(this._quaternionStart).normalize());
|
5589
5605
|
}
|
5590
5606
|
this.dispatchEvent(bi), this.dispatchEvent(Ss);
|
5591
5607
|
}
|
@@ -5676,7 +5692,7 @@ function Ei(i, e, t) {
|
|
5676
5692
|
return s[n];
|
5677
5693
|
return !1;
|
5678
5694
|
}
|
5679
|
-
const
|
5695
|
+
const Yt = new qs(), B = new O(0, 1, 0), xs = new O(0, 0, 0), Os = new Jt(), Bt = new fe(), Xt = new fe(), Se = new O(), Ts = new Jt(), xt = new O(1, 0, 0), Ve = new O(0, 1, 0), Ot = new O(0, 0, 1), Vt = new O(), Ct = new O(), wt = new O();
|
5680
5696
|
class Pr extends lt {
|
5681
5697
|
constructor(e) {
|
5682
5698
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
@@ -5690,7 +5706,7 @@ class Pr extends lt {
|
|
5690
5706
|
class Ar extends lt {
|
5691
5707
|
constructor() {
|
5692
5708
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
5693
|
-
const e = new
|
5709
|
+
const e = new Ge({
|
5694
5710
|
depthTest: !1,
|
5695
5711
|
depthWrite: !1,
|
5696
5712
|
fog: !1,
|
@@ -5757,7 +5773,7 @@ class Ar extends lt {
|
|
5757
5773
|
[new w(v, o), null, [Math.PI / 2, 0, 0]]
|
5758
5774
|
],
|
5759
5775
|
XYZ: [
|
5760
|
-
[new w(new
|
5776
|
+
[new w(new Ut(0.1, 0), p.clone()), [0, 0, 0]]
|
5761
5777
|
],
|
5762
5778
|
XY: [
|
5763
5779
|
[new w(new ae(0.15, 0.15, 0.01), u.clone()), [0.15, 0.15, 0]]
|
@@ -5782,7 +5798,7 @@ class Ar extends lt {
|
|
5782
5798
|
[new w(new de(0.2, 0, 0.6, 4), s), [0, 0, -0.3], [-Math.PI / 2, 0, 0]]
|
5783
5799
|
],
|
5784
5800
|
XYZ: [
|
5785
|
-
[new w(new
|
5801
|
+
[new w(new Ut(0.2, 0), s)]
|
5786
5802
|
],
|
5787
5803
|
XY: [
|
5788
5804
|
[new w(new ae(0.2, 0.2, 0.01), s), [0.15, 0.15, 0]]
|
@@ -5795,10 +5811,10 @@ class Ar extends lt {
|
|
5795
5811
|
]
|
5796
5812
|
}, j = {
|
5797
5813
|
START: [
|
5798
|
-
[new w(new
|
5814
|
+
[new w(new Ut(0.01, 2), n), null, null, null, "helper"]
|
5799
5815
|
],
|
5800
5816
|
END: [
|
5801
|
-
[new w(new
|
5817
|
+
[new w(new Ut(0.01, 2), n), null, null, null, "helper"]
|
5802
5818
|
],
|
5803
5819
|
DELTA: [
|
5804
5820
|
[new xe(b(), n), null, null, null, "helper"]
|
@@ -5916,10 +5932,10 @@ class Ar extends lt {
|
|
5916
5932
|
const ke = new lt();
|
5917
5933
|
for (const he in Q)
|
5918
5934
|
for (let Te = Q[he].length; Te--; ) {
|
5919
|
-
const se = Q[he][Te][0].clone(), Ue = Q[he][Te][1], je = Q[he][Te][2], Ne = Q[he][Te][3],
|
5920
|
-
se.name = he, se.tag =
|
5921
|
-
const
|
5922
|
-
|
5935
|
+
const se = Q[he][Te][0].clone(), Ue = Q[he][Te][1], je = Q[he][Te][2], Ne = Q[he][Te][3], Pt = Q[he][Te][4];
|
5936
|
+
se.name = he, se.tag = Pt, Ue && se.position.set(Ue[0], Ue[1], Ue[2]), je && se.rotation.set(je[0], je[1], je[2]), Ne && se.scale.set(Ne[0], Ne[1], Ne[2]), se.updateMatrix();
|
5937
|
+
const At = se.geometry.clone();
|
5938
|
+
At.applyMatrix4(se.matrix), se.geometry = At, se.renderOrder = 1 / 0, se.position.set(0, 0, 0), se.rotation.set(0, 0, 0), se.scale.set(1, 1, 1), ke.add(se);
|
5923
5939
|
}
|
5924
5940
|
return ke;
|
5925
5941
|
}
|
@@ -5927,7 +5943,7 @@ class Ar extends lt {
|
|
5927
5943
|
}
|
5928
5944
|
// updateMatrixWorld will update transformations and appearance of individual handles
|
5929
5945
|
updateMatrixWorld(e) {
|
5930
|
-
const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion :
|
5946
|
+
const s = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : Xt;
|
5931
5947
|
this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
|
5932
5948
|
let n = [];
|
5933
5949
|
n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
|
@@ -5936,10 +5952,10 @@ class Ar extends lt {
|
|
5936
5952
|
a.visible = !0, a.rotation.set(0, 0, 0), a.position.copy(this.worldPosition);
|
5937
5953
|
let o;
|
5938
5954
|
if (this.camera.isOrthographicCamera ? o = (this.camera.top - this.camera.bottom) / this.camera.zoom : o = this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), a.scale.set(1, 1, 1).multiplyScalar(o * this.size / 4), a.tag === "helper") {
|
5939
|
-
a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (
|
5955
|
+
a.visible = !1, a.name === "AXIS" ? (a.visible = !!this.axis, this.axis === "X" && (W.setFromEuler(Yt.set(0, 0, 0)), a.quaternion.copy(s).multiply(W), Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Y" && (W.setFromEuler(Yt.set(0, 0, Math.PI / 2)), a.quaternion.copy(s).multiply(W), Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "Z" && (W.setFromEuler(Yt.set(0, Math.PI / 2, 0)), a.quaternion.copy(s).multiply(W), Math.abs(B.copy(Ot).applyQuaternion(s).dot(this.eye)) > 0.9 && (a.visible = !1)), this.axis === "XYZE" && (W.setFromEuler(Yt.set(0, Math.PI / 2, 0)), B.copy(this.rotationAxis), a.quaternion.setFromRotationMatrix(Os.lookAt(xs, B, Ve)), a.quaternion.multiply(W), a.visible = this.dragging), this.axis === "E" && (a.visible = !1)) : a.name === "START" ? (a.position.copy(this.worldPositionStart), a.visible = this.dragging) : a.name === "END" ? (a.position.copy(this.worldPosition), a.visible = this.dragging) : a.name === "DELTA" ? (a.position.copy(this.worldPositionStart), a.quaternion.copy(this.worldQuaternionStart), re.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), re.applyQuaternion(this.worldQuaternionStart.clone().invert()), a.scale.copy(re), a.visible = this.dragging) : (a.quaternion.copy(s), this.dragging ? a.position.copy(this.worldPositionStart) : a.position.copy(this.worldPosition), this.axis && (a.visible = this.axis.search(a.name) !== -1));
|
5940
5956
|
continue;
|
5941
5957
|
}
|
5942
|
-
a.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(B.copy(
|
5958
|
+
a.quaternion.copy(s), this.mode === "translate" || this.mode === "scale" ? (a.name === "X" && Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Y" && Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "Z" && Math.abs(B.copy(Ot).applyQuaternion(s).dot(this.eye)) > 0.99 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XY" && Math.abs(B.copy(Ot).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "YZ" && Math.abs(B.copy(xt).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1), a.name === "XZ" && Math.abs(B.copy(Ve).applyQuaternion(s).dot(this.eye)) < 0.2 && (a.scale.set(1e-10, 1e-10, 1e-10), a.visible = !1)) : this.mode === "rotate" && (Bt.copy(s), B.copy(this.eye).applyQuaternion(W.copy(s).invert()), a.name.search("E") !== -1 && a.quaternion.setFromRotationMatrix(Os.lookAt(this.eye, xs, Ve)), a.name === "X" && (W.setFromAxisAngle(xt, Math.atan2(-B.y, B.z)), W.multiplyQuaternions(Bt, W), a.quaternion.copy(W)), a.name === "Y" && (W.setFromAxisAngle(Ve, Math.atan2(B.x, B.z)), W.multiplyQuaternions(Bt, W), a.quaternion.copy(W)), a.name === "Z" && (W.setFromAxisAngle(Ot, Math.atan2(B.y, B.x)), W.multiplyQuaternions(Bt, W), a.quaternion.copy(W))), a.visible = a.visible && (a.name.indexOf("X") === -1 || this.showX), a.visible = a.visible && (a.name.indexOf("Y") === -1 || this.showY), a.visible = a.visible && (a.name.indexOf("Z") === -1 || this.showZ), a.visible = a.visible && (a.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), a.material._color = a.material._color || a.material.color.clone(), a.material._opacity = a.material._opacity || a.material.opacity, a.material.color.copy(a.material._color), a.material.opacity = a.material._opacity, this.enabled && this.axis && (a.name === this.axis || this.axis.split("").some(function(c) {
|
5943
5959
|
return a.name === c;
|
5944
5960
|
})) && (a.material.color.setHex(16776960), a.material.opacity = 1);
|
5945
5961
|
}
|
@@ -5950,32 +5966,32 @@ class Dr extends w {
|
|
5950
5966
|
constructor() {
|
5951
5967
|
super(
|
5952
5968
|
new $s(1e5, 1e5, 2, 2),
|
5953
|
-
new
|
5969
|
+
new Ge({ visible: !1, wireframe: !0, side: Ri, transparent: !0, opacity: 0.1, toneMapped: !1 })
|
5954
5970
|
), this.isTransformControlsPlane = !0, this.type = "TransformControlsPlane";
|
5955
5971
|
}
|
5956
5972
|
updateMatrixWorld(e) {
|
5957
5973
|
let t = this.space;
|
5958
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"),
|
5974
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Vt.copy(xt).applyQuaternion(t === "local" ? this.worldQuaternion : Xt), Ct.copy(Ve).applyQuaternion(t === "local" ? this.worldQuaternion : Xt), wt.copy(Ot).applyQuaternion(t === "local" ? this.worldQuaternion : Xt), B.copy(Ct), this.mode) {
|
5959
5975
|
case "translate":
|
5960
5976
|
case "scale":
|
5961
5977
|
switch (this.axis) {
|
5962
5978
|
case "X":
|
5963
|
-
B.copy(this.eye).cross(
|
5979
|
+
B.copy(this.eye).cross(Vt), Se.copy(Vt).cross(B);
|
5964
5980
|
break;
|
5965
5981
|
case "Y":
|
5966
|
-
B.copy(this.eye).cross(
|
5982
|
+
B.copy(this.eye).cross(Ct), Se.copy(Ct).cross(B);
|
5967
5983
|
break;
|
5968
5984
|
case "Z":
|
5969
|
-
B.copy(this.eye).cross(
|
5985
|
+
B.copy(this.eye).cross(wt), Se.copy(wt).cross(B);
|
5970
5986
|
break;
|
5971
5987
|
case "XY":
|
5972
|
-
Se.copy(
|
5988
|
+
Se.copy(wt);
|
5973
5989
|
break;
|
5974
5990
|
case "YZ":
|
5975
|
-
Se.copy(
|
5991
|
+
Se.copy(Vt);
|
5976
5992
|
break;
|
5977
5993
|
case "XZ":
|
5978
|
-
B.copy(
|
5994
|
+
B.copy(wt), Se.copy(Ct);
|
5979
5995
|
break;
|
5980
5996
|
case "XYZ":
|
5981
5997
|
case "E":
|
@@ -6077,12 +6093,12 @@ class Ms extends lt {
|
|
6077
6093
|
_draggableScale = 10;
|
6078
6094
|
_transform;
|
6079
6095
|
raycaster;
|
6080
|
-
draggedMat = new
|
6096
|
+
draggedMat = new Ge();
|
6081
6097
|
parentGroup;
|
6082
6098
|
group;
|
6083
6099
|
constructor(e, t) {
|
6084
|
-
const s = new
|
6085
|
-
super(), this.name = e, this.lineMaterial = new Ii({ color: s }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Ks(1.5), new
|
6100
|
+
const s = new Mt(Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()), Je(0.5, 1, Math.random()));
|
6101
|
+
super(), this.name = e, this.lineMaterial = new Ii({ color: s }), this.line = new xe(new ot(), this.lineMaterial), this.line.name = "line", this.add(this.line), this._camera = t, this.curveType = "catmullrom", this.draggedMat.color = s, this.draggable = new lt(), this.draggable.name = "draggablePoints", this.add(this.draggable), this.curvePos = new w(new Ks(1.5), new Ge({ color: s })), this.curvePos.name = "curvePos", this.curvePos.scale.setScalar(this._draggableScale), this.curvePos.visible = !1, this.add(this.curvePos), this.raycaster = new Qt(), this.raycaster.params.Line.threshold = 3, this.enable();
|
6086
6102
|
}
|
6087
6103
|
enable() {
|
6088
6104
|
document.addEventListener("pointerdown", this.onMouseClick);
|
@@ -6392,7 +6408,7 @@ class Ms extends lt {
|
|
6392
6408
|
e.name, e.visible = this.draggable.visible;
|
6393
6409
|
};
|
6394
6410
|
}
|
6395
|
-
let
|
6411
|
+
let Zt = 0;
|
6396
6412
|
class Ir extends lt {
|
6397
6413
|
defaultScale = 10;
|
6398
6414
|
_camera;
|
@@ -6401,7 +6417,7 @@ class Ir extends lt {
|
|
6401
6417
|
super(), this.name = "Spline Editor", this._camera = e, D.addEventListener(A.ADD_SPLINE, this.onAddSpline);
|
6402
6418
|
}
|
6403
6419
|
initDebug() {
|
6404
|
-
this.group =
|
6420
|
+
this.group = J.addEditorGroup({
|
6405
6421
|
title: this.name,
|
6406
6422
|
items: [
|
6407
6423
|
{
|
@@ -6446,14 +6462,14 @@ class Ir extends lt {
|
|
6446
6462
|
});
|
6447
6463
|
}
|
6448
6464
|
dispose() {
|
6449
|
-
D.removeEventListener(A.ADD_SPLINE, this.onAddSpline),
|
6465
|
+
D.removeEventListener(A.ADD_SPLINE, this.onAddSpline), J.removeEditorGroup(this.name);
|
6450
6466
|
}
|
6451
6467
|
addSpline(e) {
|
6452
6468
|
e.draggableScale = this.defaultScale, e.hideTransform(), this.group?.current !== null && e.initDebug(this.group.current), this.add(e);
|
6453
6469
|
}
|
6454
6470
|
createSpline = (e = []) => {
|
6455
|
-
const t = `Spline ${
|
6456
|
-
return s.addPoints(e), this.addSpline(s),
|
6471
|
+
const t = `Spline ${Zt + 1}`, s = new Ms(t, this._camera);
|
6472
|
+
return s.addPoints(e), this.addSpline(s), Zt++, s;
|
6457
6473
|
};
|
6458
6474
|
createSplineFromArray = (e) => {
|
6459
6475
|
const t = [];
|
@@ -6472,12 +6488,12 @@ class Ir extends lt {
|
|
6472
6488
|
});
|
6473
6489
|
};
|
6474
6490
|
onAddSpline = (e) => {
|
6475
|
-
const t = JSON.parse(e.value), s = `Spline ${
|
6491
|
+
const t = JSON.parse(e.value), s = `Spline ${Zt + 1}`, n = [];
|
6476
6492
|
t.points.forEach((a) => {
|
6477
6493
|
n.push(new O(a[0], a[1], a[2]));
|
6478
6494
|
});
|
6479
6495
|
const r = new Ms(s, this.camera);
|
6480
|
-
r.addPoints(n), this.addSpline(r),
|
6496
|
+
r.addPoints(n), this.addSpline(r), Zt++;
|
6481
6497
|
};
|
6482
6498
|
get camera() {
|
6483
6499
|
return this._camera;
|
@@ -6495,7 +6511,7 @@ const Ps = [
|
|
6495
6511
|
"Stacked",
|
6496
6512
|
"Quad"
|
6497
6513
|
], Lr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAC60lEQVRYhe2YT4hNcRTHP48xpmYaNAvRyEQxEhnKQljYsRm9/EmSyJiMFAsMZWNhJYoNIUVJ2VGiyb9ZzIpMpkQSahbGv9GMYWrM+1rc2zjvzvvdd+99rzdvMd+6de75nd+5387vnN/v/G5KEuWMKRNNIB8mCRaKiiL5qQb2ApuBuUAV0Ad0AJeB3sSeJRX6LJbULTf6JTUn9Z+KWMUpPyp/Avoa4CNQZ3Sj/lNpdL/xottR7AjOkHRUUpekN5I6JbVLavDH75lIfZN0UFKTpCWS0pJem/HeJBEMG6yV1ONYtgFJbZJ+GF1jDh+zJb03NuliEuwMkMo4yErS2RA/LcbuYVyCrm1mA7Dal/8Cu4FG4JD/HsTTkCy6a+SVMTPQuc1sBKb78nHghi+/A+YBxwL2lbhRY+ThuARdEVxu5JdGFvACr0otdoZ8Y4+Rn0Sn5sFFsMvI6YB9MzA1YJ8mN8k1wAHzfj4uQVdyrpI0aJL7oqTtkq4FiqPLyCOSbktqlbRL0jlJQ2b8QdwCUZ4qvhRStZL0XFK1pMd57CRvq5mfhKBriRfiFUMY6oD7eOdwPlQAN4G10dfWg+uouwXsiOssAj4AC+JMcEWwvnAuOTEr7gTXPmg34zagOwkbIIOXAo9CbDYBrcBXYN+4UUdy2sRflyS5zVNlfPX7ugpJW5V9nI7mmh+lYU0lCZ2B3TOnAVuAk0BTwC5nuhWro46KauBOQJch5OpRaoIW34GreGf+YZdRqS9NAj4Bp4ClQDvwOWxCqSM4ADQEdKE5XvbXzlITrAVe4TW+M6NMKDXBFLAMuAD0ACfIc7pMZBXXA2cY3/xmodQRHAL2A2+NLtj8ZiEKwUL/z2WMPAJcAVYALWSf8dZuDFGWeBHwKxm3sWYhiGG8Tfo6sA2vSfiSy4GrH3wGrDcfKSSKKf6v1E9yF0XK9Q1XBPuMXMw8HXTonQFwETwNzMFr64v1jzgFHIk9ybHEZYPJo65QlD3Bf2/Q/eaHPiSWAAAAAElFTkSuQmCC", kr = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAACgAAAAoCAYAAACM/rhtAAAACXBIWXMAAAsTAAALEwEAmpwYAAAETklEQVRYhe2YXYhVVRTHf3d0/JhyUrMpFbImM+whSa3Mynww+4AeIgiKoozooQ+KyMyXIAujF6OXqHyI6iEKKYgIP/owsjSFqCkprdDUTEcjbWZ0HHV+Pex1ucfb9Z57Z9REXHA4Z++99l7/s/ZZ/7X2KaiczNLwfwPIk9MA+yunNMAG4DHgV+BvoB3YFff2TPstYEyfrajVroI6Sr1GvahsbJC63HzZq04pmztSvU5tVRuqYRiYg78JeBR4HPg5ntdmxovz9wJfA3uAxuibDLQCA+IqynnAQuBuYCnwMLC1rx48U12U8cZqdWqMDcx4cI16qTpYbVKHqa+ovWUeHKsujn7VL9ULq2HI+wY7gVeBJdGeFu3J4ZUiy/cAXeHRRuAQsC/GC0B3eG4BcH/0tUV7czUAeVsMsBF4Kha9HZgCvAncAuwPnXHA0wFuGLANuDrGuoGDwFxgTqzzQ7RX5FrP2eLsdb76vnogtme6+nE8H1YPlQXHwbi3q9eqn0e7Tb25VrsF68vFY0lb1AGcDTwItGQ8tQM4AIwGmqP/EPAu8A0wElgJfFGzxTo8mKWXu9Rd4ZF96jvqjSbauEC9Sn1O3R463epLaku99voCsFXdkAH3kNpcQW+IiT/bQne3eufxBtioPqP2mKhioXpWzpxb1T8C5Ifh4ZptVoriRmAIKdrI3Lujf3bobAPeJpF0NVkKrAFuI9HTOBIxnxFrF4OgQKKr/dnJlQA+AcwABgOHA4zAamA5cE7orQL+zAEHiWI+A2bFC7aSguheYCgpqAphZz3wSB7AecCICv2TgH8oFRib4gVqka0k0h8CXAxMBW6ooDejFoCvA9OBQUAvKWM0kDz4XUZvNKXtyZMWUl7vBbaQXq457PeEziDgx/KJlQAuIPFdMcEXv5OdYWBP9M8k8VpnDQCvB4aTSrCNJB5cSdrW3tBpIJVnR0qdUTxAfdGUOVTnmwqEanNmqltC/9OgqePKg5eom8PgdvW+oJ9Kupera0O3U50TL3lcAaI+oHaF4R3qa6Z822wq0Saq89T1lmSxOrxeW/Xm4uGkiqQDmECKuKHxHW0HdpMiewSpvGqKeR8Ay0iBsYIjg6261PE2o9Q3Yqv+MqWxO9R1Hl12qs+q49Vlppy82pSr+5xJKsko4AXgHlJ0t5NIeg3wLXAlqZhtIUV8J6nmWwX8QiLjdhL5TwMWkY4R6/rrwYKlMr1Y321QZ/vfwBijPqm+rF4Wc7PjE9QllurGVeoV5gRNHsAm9fnMom3qrKPoTjKdMXaYyrFygEWQ72XWW24qhPu8xcUc2UU6O8wFPjmK7jhgPHAuMJGUGQ6U6WwE5sfzTXGvei7KA9hFOiR9D/wOfFVFt4dS2tpfRe83Ur7/CPiJakfOGgBCypubatArl2r8VfOax/LfzABKtePAzHO/5FgC7KBEzB2kOrDfUm8mOeFySv9+OyFyGmB/5aQH+C9BVKmVCNuMZgAAAABJRU5ErkJggg==";
|
6498
|
-
class Pe extends
|
6514
|
+
class Pe extends ei {
|
6499
6515
|
static instance = null;
|
6500
6516
|
scene = new Ds();
|
6501
6517
|
renderer;
|
@@ -6518,7 +6534,7 @@ class Pe extends Jt {
|
|
6518
6534
|
depthMaterial = new Jn();
|
6519
6535
|
normalsMaterial = new ea();
|
6520
6536
|
uvMaterial = new Cr();
|
6521
|
-
wireframeMaterial = new
|
6537
|
+
wireframeMaterial = new Ge({
|
6522
6538
|
opacity: 0.33,
|
6523
6539
|
transparent: !0,
|
6524
6540
|
wireframe: !0
|
@@ -6543,7 +6559,7 @@ class Pe extends Jt {
|
|
6543
6559
|
// Interactions
|
6544
6560
|
selectedItem = void 0;
|
6545
6561
|
debugCamera;
|
6546
|
-
raycaster = new
|
6562
|
+
raycaster = new Qt();
|
6547
6563
|
pointer = new oe();
|
6548
6564
|
cameraControls = void 0;
|
6549
6565
|
// References
|
@@ -6569,11 +6585,11 @@ class Pe extends Jt {
|
|
6569
6585
|
Vector3: O,
|
6570
6586
|
Vector4: ca,
|
6571
6587
|
Quaternion: fe,
|
6572
|
-
Matrix4:
|
6588
|
+
Matrix4: Jt,
|
6573
6589
|
Spherical: Si,
|
6574
6590
|
Box3: ha,
|
6575
6591
|
Sphere: da,
|
6576
|
-
Raycaster:
|
6592
|
+
Raycaster: Qt
|
6577
6593
|
};
|
6578
6594
|
Oe.install({ THREE: r }), this.setupScene(), this.setupTools();
|
6579
6595
|
const a = localStorage.getItem(this.expandedCameraVisibility);
|
@@ -6723,7 +6739,7 @@ class Pe extends Jt {
|
|
6723
6739
|
] }),
|
6724
6740
|
/* @__PURE__ */ d.jsxs("div", { className: "settings", children: [
|
6725
6741
|
/* @__PURE__ */ d.jsx(
|
6726
|
-
|
6742
|
+
Kt,
|
6727
6743
|
{
|
6728
6744
|
title: "View",
|
6729
6745
|
index: Ps.indexOf(this.state.mode),
|
@@ -6742,7 +6758,7 @@ class Pe extends Jt {
|
|
6742
6758
|
}
|
6743
6759
|
),
|
6744
6760
|
/* @__PURE__ */ d.jsx(
|
6745
|
-
|
6761
|
+
Kt,
|
6746
6762
|
{
|
6747
6763
|
title: "Interact",
|
6748
6764
|
index: this.state.interactionMode === "Orbit" ? 0 : 1,
|
@@ -6772,9 +6788,12 @@ class Pe extends Jt {
|
|
6772
6788
|
height: 24,
|
6773
6789
|
top: 2,
|
6774
6790
|
onClick: (t) => {
|
6775
|
-
this.cameraVisibility = t, this.saveExpandedCameraVisibility(), this.cameraHelpers.forEach((s) => {
|
6791
|
+
if (this.cameraVisibility = t, this.saveExpandedCameraVisibility(), this.cameraHelpers.forEach((s) => {
|
6776
6792
|
s.visible = t;
|
6777
|
-
})
|
6793
|
+
}), this.selectedItem !== void 0 && !t && this.selectedItem instanceof pt) {
|
6794
|
+
const s = this.cameraHelpers.get(this.selectedItem.name);
|
6795
|
+
s !== void 0 && (s.visible = !0);
|
6796
|
+
}
|
6778
6797
|
}
|
6779
6798
|
}
|
6780
6799
|
),
|
@@ -6787,9 +6806,12 @@ class Pe extends Jt {
|
|
6787
6806
|
height: 24,
|
6788
6807
|
top: 4,
|
6789
6808
|
onClick: (t) => {
|
6790
|
-
this.lightVisibility = t, this.saveExpandedLightVisibility(), this.lightHelpers.forEach((s) => {
|
6809
|
+
if (this.lightVisibility = t, this.saveExpandedLightVisibility(), this.lightHelpers.forEach((s) => {
|
6791
6810
|
s.visible = t;
|
6792
|
-
})
|
6811
|
+
}), this.selectedItem !== void 0 && !t && this.selectedItem.isLight === !0) {
|
6812
|
+
const s = this.lightHelpers.get(this.selectedItem.name);
|
6813
|
+
s !== void 0 && (s.visible = !0);
|
6814
|
+
}
|
6793
6815
|
}
|
6794
6816
|
}
|
6795
6817
|
)
|
@@ -6809,7 +6831,7 @@ class Pe extends Jt {
|
|
6809
6831
|
const a = new wi(-100, 100, 100, -100, 50, 5e3);
|
6810
6832
|
return a.name = n, a.position.copy(r), a.lookAt(0, 0, 0), this.cameras.set(n, a), a;
|
6811
6833
|
};
|
6812
|
-
e("Top", new O(0, 1e3, 0)), e("Bottom", new O(0, -1e3, 0)), e("Left", new O(-1e3, 0, 0)), e("Right", new O(1e3, 0, 0)), e("Front", new O(0, 0, 1e3)), e("Back", new O(0, 0, -1e3)), e("Orthographic", new O(1e3, 1e3, 1e3)), e("UI", new O()), this.debugCamera = new
|
6834
|
+
e("Top", new O(0, 1e3, 0)), e("Bottom", new O(0, -1e3, 0)), e("Left", new O(-1e3, 0, 0)), e("Right", new O(1e3, 0, 0)), e("Front", new O(0, 0, 1e3)), e("Back", new O(0, 0, -1e3)), e("Orthographic", new O(1e3, 1e3, 1e3)), e("UI", new O()), this.debugCamera = new pt(60, 1, 50, 5e3), this.debugCamera.name = "Debug", this.debugCamera.position.set(500, 500, 500), this.debugCamera.lookAt(0, 0, 0), this.cameras.set("Debug", this.debugCamera), this.currentCamera = this.debugCamera;
|
6813
6835
|
const t = localStorage, s = this.props.three.app.appID;
|
6814
6836
|
this.tlCam = this.cameras.get(t.getItem(`${s}_tlCam`)), this.trCam = this.cameras.get(t.getItem(`${s}_trCam`)), this.blCam = this.cameras.get(t.getItem(`${s}_blCam`)), this.brCam = this.cameras.get(t.getItem(`${s}_brCam`)), this.tlCam === void 0 && (this.tlCam = this.cameras.get("Debug")), this.trCam === void 0 && (this.trCam = this.cameras.get("Orthographic")), this.blCam === void 0 && (this.blCam = this.cameras.get("Front")), this.brCam === void 0 && (this.brCam = this.cameras.get("Top"));
|
6815
6837
|
}
|
@@ -6882,7 +6904,7 @@ class Pe extends Jt {
|
|
6882
6904
|
}
|
6883
6905
|
const r = s / n;
|
6884
6906
|
this.cameras.forEach((a) => {
|
6885
|
-
a instanceof wi ? (a.left = s / -2, a.right = s / 2, a.top = n / 2, a.bottom = n / -2, a.name === "UI" && (a.position.x = this.width / 2, a.position.y = this.height / -2, a.position.z = 100), a.updateProjectionMatrix()) : a instanceof
|
6907
|
+
a instanceof wi ? (a.left = s / -2, a.right = s / 2, a.top = n / 2, a.bottom = n / -2, a.name === "UI" && (a.position.x = this.width / 2, a.position.y = this.height / -2, a.position.z = 100), a.updateProjectionMatrix()) : a instanceof pt && (a.aspect = r, a.updateProjectionMatrix(), this.cameraHelpers.get(a.name)?.update());
|
6886
6908
|
});
|
6887
6909
|
};
|
6888
6910
|
sceneUpdate = (e) => {
|
@@ -6895,7 +6917,7 @@ class Pe extends Jt {
|
|
6895
6917
|
};
|
6896
6918
|
addCamera = (e) => {
|
6897
6919
|
const t = e.value, s = this.props.three.scene?.getObjectByProperty("uuid", t.uuid);
|
6898
|
-
if (s !== void 0 && this.cameras.set(t.name, s), s instanceof
|
6920
|
+
if (s !== void 0 && this.cameras.set(t.name, s), s instanceof pt) {
|
6899
6921
|
const n = new ia(s);
|
6900
6922
|
n.visible = this.cameraVisibility, this.cameraHelpers.set(s.name, n), this.scene.add(n);
|
6901
6923
|
}
|
@@ -6966,14 +6988,25 @@ class Pe extends Jt {
|
|
6966
6988
|
}
|
6967
6989
|
};
|
6968
6990
|
onSetSelectedItem = (e) => {
|
6969
|
-
this.selectedItem = this.currentScene.getObjectByProperty("uuid", e.value.uuid), this.selectedItem !== void 0 && (this.currentTransform !== void 0 && (this.currentTransform.removeEventListener("objectChange", this.onUpdateTransform), ce.instance.remove(this.currentTransform.getHelper().name)), this.currentTransform = ce.instance.add(e.value.name), this.currentTransform.attach(this.selectedItem), this.scene.add(this.currentTransform.getHelper()), this.currentTransform.addEventListener("objectChange", this.onUpdateTransform));
|
6991
|
+
this.selectedItem !== void 0 && this.updateSelectedItemHelper(!1), this.selectedItem = this.currentScene.getObjectByProperty("uuid", e.value.uuid), this.selectedItem !== void 0 && (this.currentTransform !== void 0 && (this.currentTransform.removeEventListener("objectChange", this.onUpdateTransform), ce.instance.remove(this.currentTransform.getHelper().name)), this.currentTransform = ce.instance.add(e.value.name), this.currentTransform.attach(this.selectedItem), this.scene.add(this.currentTransform.getHelper()), this.currentTransform.addEventListener("objectChange", this.onUpdateTransform), this.updateSelectedItemHelper(!0));
|
6970
6992
|
};
|
6993
|
+
updateSelectedItemHelper(e) {
|
6994
|
+
if (this.selectedItem !== void 0) {
|
6995
|
+
if (this.selectedItem instanceof pt && !this.cameraVisibility) {
|
6996
|
+
const t = this.cameraHelpers.get(this.selectedItem.name);
|
6997
|
+
t !== void 0 && (t.visible = e);
|
6998
|
+
} else if (this.selectedItem.isLight === !0 && !this.lightVisibility) {
|
6999
|
+
const t = this.lightHelpers.get(this.selectedItem.name);
|
7000
|
+
t !== void 0 && (t.visible = e);
|
7001
|
+
}
|
7002
|
+
}
|
7003
|
+
}
|
6971
7004
|
onUpdateTransform = () => {
|
6972
7005
|
this.selectedItem !== void 0 && (this.props.three.updateObject(this.selectedItem.uuid, "position", this.selectedItem.position), this.props.three.updateObject(this.selectedItem.uuid, "rotation", {
|
6973
7006
|
x: this.selectedItem.rotation.x,
|
6974
7007
|
y: this.selectedItem.rotation.y,
|
6975
7008
|
z: this.selectedItem.rotation.z
|
6976
|
-
}), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale),
|
7009
|
+
}), this.props.three.updateObject(this.selectedItem.uuid, "scale", this.selectedItem.scale), ii.instance.update());
|
6977
7010
|
};
|
6978
7011
|
// Utils
|
6979
7012
|
clearLightHelpers = () => {
|
@@ -7138,9 +7171,9 @@ class Pe extends Jt {
|
|
7138
7171
|
return `${this.appID}_multiviewLightVisibility`;
|
7139
7172
|
}
|
7140
7173
|
}
|
7141
|
-
class
|
7174
|
+
class ii extends ei {
|
7142
7175
|
static instance;
|
7143
|
-
matrix = new
|
7176
|
+
matrix = new Jt();
|
7144
7177
|
position = new O();
|
7145
7178
|
rotation = new qs();
|
7146
7179
|
scale = new O();
|
@@ -7151,7 +7184,7 @@ class ti extends Jt {
|
|
7151
7184
|
this.open = s, this.saveExpanded(), this.state = {
|
7152
7185
|
lastUpdated: 0,
|
7153
7186
|
expanded: s
|
7154
|
-
}, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)),
|
7187
|
+
}, this.matrix.elements = e.object.matrix, e.object.uuid.length > 0 && (this.position.setFromMatrixPosition(this.matrix), this.rotation.setFromRotationMatrix(this.matrix), this.scale.setFromMatrixScale(this.matrix)), ii.instance = this;
|
7155
7188
|
}
|
7156
7189
|
update() {
|
7157
7190
|
if (Pe.instance) {
|
@@ -7211,7 +7244,7 @@ class ti extends Jt {
|
|
7211
7244
|
const n = this.props.three.getScene(this.props.object.uuid);
|
7212
7245
|
if (n) {
|
7213
7246
|
const r = n.getObjectByProperty("uuid", this.props.object.uuid);
|
7214
|
-
|
7247
|
+
q(r, e, s);
|
7215
7248
|
}
|
7216
7249
|
};
|
7217
7250
|
saveExpanded() {
|
@@ -7262,12 +7295,12 @@ function Ur(i, e) {
|
|
7262
7295
|
type: "color",
|
7263
7296
|
value: c,
|
7264
7297
|
onChange: (l, u) => {
|
7265
|
-
const p = new
|
7298
|
+
const p = new Mt(u);
|
7266
7299
|
e.updateObject(i.uuid, l, p);
|
7267
7300
|
const m = e.getScene(i.uuid);
|
7268
7301
|
if (m !== null) {
|
7269
7302
|
const _ = m.getObjectByProperty("uuid", i.uuid);
|
7270
|
-
|
7303
|
+
q(_, l, p);
|
7271
7304
|
}
|
7272
7305
|
}
|
7273
7306
|
}) : a.push({
|
@@ -7281,7 +7314,7 @@ function Ur(i, e) {
|
|
7281
7314
|
const p = e.getScene(i.uuid);
|
7282
7315
|
if (p !== null) {
|
7283
7316
|
const m = p.getObjectByProperty("uuid", i.uuid);
|
7284
|
-
|
7317
|
+
q(m, l, u);
|
7285
7318
|
}
|
7286
7319
|
}
|
7287
7320
|
}));
|
@@ -7413,7 +7446,7 @@ function Nr(i) {
|
|
7413
7446
|
}, []);
|
7414
7447
|
const s = ne.type.toLowerCase(), n = ne.animations.length > 0 || ne.mixer !== void 0, r = s.search("mesh") > -1 || s.search("line") > -1 || s.search("points") > -1;
|
7415
7448
|
return /* @__PURE__ */ d.jsx(
|
7416
|
-
|
7449
|
+
qt,
|
7417
7450
|
{
|
7418
7451
|
label: "Inspector",
|
7419
7452
|
button: ne.uuid.length > 0 ? /* @__PURE__ */ d.jsx("button", { className: "remove", onClick: () => {
|
@@ -7453,7 +7486,7 @@ function Nr(i) {
|
|
7453
7486
|
)
|
7454
7487
|
] }),
|
7455
7488
|
/* @__PURE__ */ d.jsxs(d.Fragment, { children: [
|
7456
|
-
/* @__PURE__ */ d.jsx(
|
7489
|
+
/* @__PURE__ */ d.jsx(ii, { object: ne, three: i.three }),
|
7457
7490
|
n ? jr(ne, i.three) : null,
|
7458
7491
|
s.search("camera") > -1 ? Ja(ne, i.three) : null,
|
7459
7492
|
s.search("light") > -1 ? Ur(ne, i.three) : null,
|
@@ -7469,7 +7502,7 @@ function Fr(i) {
|
|
7469
7502
|
const l = c.value;
|
7470
7503
|
e.push(l), t.push(
|
7471
7504
|
/* @__PURE__ */ d.jsx(
|
7472
|
-
|
7505
|
+
qt,
|
7473
7506
|
{
|
7474
7507
|
label: `Scene: ${l.name}`,
|
7475
7508
|
scene: l,
|
@@ -7487,7 +7520,7 @@ function Fr(i) {
|
|
7487
7520
|
for (let u = 0; u < e.length; u++)
|
7488
7521
|
if (l.uuid === e[u].uuid) {
|
7489
7522
|
e[u] = l, t[u] = /* @__PURE__ */ d.jsx(
|
7490
|
-
|
7523
|
+
qt,
|
7491
7524
|
{
|
7492
7525
|
label: `Scene: ${l.name}`,
|
7493
7526
|
scene: l,
|
@@ -7514,7 +7547,7 @@ function Fr(i) {
|
|
7514
7547
|
}), []), /* @__PURE__ */ d.jsxs("div", { id: "SidePanel", children: [
|
7515
7548
|
/* @__PURE__ */ d.jsx("div", { className: "scenes", children: t }, s),
|
7516
7549
|
/* @__PURE__ */ d.jsx(Nr, { three: i.three }),
|
7517
|
-
/* @__PURE__ */ d.jsx(
|
7550
|
+
/* @__PURE__ */ d.jsx(J, { three: i.three })
|
7518
7551
|
] });
|
7519
7552
|
}
|
7520
7553
|
function eo(i) {
|
@@ -7530,7 +7563,7 @@ function eo(i) {
|
|
7530
7563
|
u !== void 0 && i.three.setObject(u);
|
7531
7564
|
}, s = (o, c, l) => {
|
7532
7565
|
const p = e(o)?.getObjectByProperty("uuid", o);
|
7533
|
-
p !== void 0 &&
|
7566
|
+
p !== void 0 && q(p, c, l);
|
7534
7567
|
}, n = (o) => {
|
7535
7568
|
const c = o.value, { key: l, value: u, uuid: p } = c;
|
7536
7569
|
s(p, l, u);
|
@@ -7599,8 +7632,8 @@ function to(i) {
|
|
7599
7632
|
] }) });
|
7600
7633
|
}
|
7601
7634
|
export {
|
7602
|
-
|
7603
|
-
|
7635
|
+
qt as Accordion,
|
7636
|
+
Gr as Application,
|
7604
7637
|
Li as BaseRemote,
|
7605
7638
|
an as ChildObject,
|
7606
7639
|
as as ContainerObject,
|
@@ -7609,7 +7642,7 @@ export {
|
|
7609
7642
|
Ma as Dropdown,
|
7610
7643
|
Pa as DropdownItem,
|
7611
7644
|
zr as Editor,
|
7612
|
-
|
7645
|
+
Wt as ExportTexture,
|
7613
7646
|
Nr as Inspector,
|
7614
7647
|
Pe as MultiView,
|
7615
7648
|
nn as NavButton,
|
@@ -7624,7 +7657,7 @@ export {
|
|
7624
7657
|
to as ThreeEditor,
|
7625
7658
|
A as ToolEvents,
|
7626
7659
|
ce as Transform,
|
7627
|
-
|
7660
|
+
$t as capitalize,
|
7628
7661
|
Be as clamp,
|
7629
7662
|
ts as colorToHex,
|
7630
7663
|
pa as copyToClipboard,
|
@@ -7633,7 +7666,7 @@ export {
|
|
7633
7666
|
Vr as defaultTheatreCallback,
|
7634
7667
|
Le as dispose,
|
7635
7668
|
ga as disposeMaterial,
|
7636
|
-
|
7669
|
+
Wr as disposeTexture,
|
7637
7670
|
Zr as distance,
|
7638
7671
|
Ti as hierarchyUUID,
|
7639
7672
|
fa as isColor,
|