@tomorrowevening/hermes 0.0.66 → 0.0.67
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hermes.cjs.js +12 -12
- package/dist/hermes.es.js +572 -536
- package/package.json +1 -1
package/dist/hermes.es.js
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
import { EventDispatcher as pn, Texture as gn, CubeTexture as Hn, RepeatWrapping as qt, WebGLRenderTarget as Vn, Color as $t, FrontSide as Yn, BackSide as vn, DoubleSide as bn, NoBlending as qn, NormalBlending as Kn, AdditiveBlending as Zn, SubtractiveBlending as Xn, MultiplyBlending as Jn, CustomBlending as Qn, AddEquation as ea, SubtractEquation as ta, ReverseSubtractEquation as na, MinEquation as aa, MaxEquation as ia, ZeroFactor as yn, OneFactor as En, SrcColorFactor as xn, OneMinusSrcColorFactor as Sn, SrcAlphaFactor as Cn, OneMinusSrcAlphaFactor as wn, DstAlphaFactor as Mn, OneMinusDstAlphaFactor as On, DstColorFactor as Tn, OneMinusDstColorFactor as _n, SrcAlphaSaturateFactor as ra, ConstantColorFactor as Rn, OneMinusConstantColorFactor as kn, ConstantAlphaFactor as Dn, OneMinusConstantAlphaFactor as Pn, Matrix4 as sa, Vector3 as
|
1
|
+
import { EventDispatcher as pn, Texture as gn, CubeTexture as Hn, RepeatWrapping as qt, WebGLRenderTarget as Vn, Color as $t, FrontSide as Yn, BackSide as vn, DoubleSide as bn, NoBlending as qn, NormalBlending as Kn, AdditiveBlending as Zn, SubtractiveBlending as Xn, MultiplyBlending as Jn, CustomBlending as Qn, AddEquation as ea, SubtractEquation as ta, ReverseSubtractEquation as na, MinEquation as aa, MaxEquation as ia, ZeroFactor as yn, OneFactor as En, SrcColorFactor as xn, OneMinusSrcColorFactor as Sn, SrcAlphaFactor as Cn, OneMinusSrcAlphaFactor as wn, DstAlphaFactor as Mn, OneMinusDstAlphaFactor as On, DstColorFactor as Tn, OneMinusDstColorFactor as _n, SrcAlphaSaturateFactor as ra, ConstantColorFactor as Rn, OneMinusConstantColorFactor as kn, ConstantAlphaFactor as Dn, OneMinusConstantAlphaFactor as Pn, Matrix4 as sa, Vector3 as q, Euler as oa, Line as ca, BufferGeometry as Kt, Float32BufferAttribute as Zt, LineBasicMaterial as la, Mesh as An, MeshBasicMaterial as In, Ray as ua, Plane as da, MathUtils as ha, MOUSE as nt, TOUCH as at, Quaternion as Xt, Spherical as Jt, Vector2 as me, ShaderMaterial as jn, GLSL3 as fa, PlaneGeometry as ma, Scene as pa, Group as ga, AxesHelper as Qt, MeshDepthMaterial as va, MeshNormalMaterial as ba, WebGLRenderer as ya, PerspectiveCamera as At, Raycaster as Ea, OrthographicCamera as en, CameraHelper as xa, SpotLightHelper as Sa, PointLightHelper as Ca, HemisphereLightHelper as wa, DirectionalLightHelper as Ma } from "three";
|
2
2
|
import { Pane as Oa } from "tweakpane";
|
3
3
|
import * as Ta from "@tweakpane/plugin-essentials";
|
4
|
-
import Nn, { useState as
|
4
|
+
import Nn, { useState as K, useRef as Z, useEffect as _e, useMemo as se, forwardRef as _a } from "react";
|
5
5
|
import { Reorder as Ln } from "framer-motion";
|
6
6
|
const zt = () => {
|
7
7
|
}, ki = () => {
|
@@ -249,12 +249,12 @@ class Gt extends _t {
|
|
249
249
|
const m = h.onValuesChange((f) => {
|
250
250
|
if (this.app.editor) {
|
251
251
|
for (const S in f) {
|
252
|
-
const
|
253
|
-
typeof
|
254
|
-
r:
|
255
|
-
g:
|
256
|
-
b:
|
257
|
-
a:
|
252
|
+
const P = f[S];
|
253
|
+
typeof P == "object" && ka(P) && (f[S] = {
|
254
|
+
r: P.r,
|
255
|
+
g: P.g,
|
256
|
+
b: P.b,
|
257
|
+
a: P.a
|
258
258
|
});
|
259
259
|
}
|
260
260
|
this.app.send({
|
@@ -267,8 +267,8 @@ class Gt extends _t {
|
|
267
267
|
}
|
268
268
|
});
|
269
269
|
}
|
270
|
-
const
|
271
|
-
|
270
|
+
const g = this.sheetObjectCBs.get(d);
|
271
|
+
g !== void 0 && g(f);
|
272
272
|
});
|
273
273
|
return this.sheetObjectUnsubscribe.set(d, m), h;
|
274
274
|
}
|
@@ -576,7 +576,7 @@ function La(e, n) {
|
|
576
576
|
for (const a in n)
|
577
577
|
e[a] = n[a];
|
578
578
|
}
|
579
|
-
function
|
579
|
+
function Q(e, n, a) {
|
580
580
|
const t = n.split("."), i = t.length;
|
581
581
|
if (typeof a != "object")
|
582
582
|
switch (i) {
|
@@ -954,14 +954,14 @@ function Ba() {
|
|
954
954
|
sn = 1;
|
955
955
|
var e = Nn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), t = Object.prototype.hasOwnProperty, i = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, c = { key: !0, ref: !0, __self: !0, __source: !0 };
|
956
956
|
function l(r, d, h) {
|
957
|
-
var m, f = {},
|
958
|
-
h !== void 0 && (
|
957
|
+
var m, f = {}, g = null, S = null;
|
958
|
+
h !== void 0 && (g = "" + h), d.key !== void 0 && (g = "" + d.key), d.ref !== void 0 && (S = d.ref);
|
959
959
|
for (m in d)
|
960
960
|
t.call(d, m) && !c.hasOwnProperty(m) && (f[m] = d[m]);
|
961
961
|
if (r && r.defaultProps)
|
962
962
|
for (m in d = r.defaultProps, d)
|
963
963
|
f[m] === void 0 && (f[m] = d[m]);
|
964
|
-
return { $$typeof: n, type: r, key:
|
964
|
+
return { $$typeof: n, type: r, key: g, ref: S, props: f, _owner: i.current };
|
965
965
|
}
|
966
966
|
return lt.Fragment = a, lt.jsx = l, lt.jsxs = l, lt;
|
967
967
|
}
|
@@ -978,54 +978,54 @@ var ut = {};
|
|
978
978
|
var on;
|
979
979
|
function Fa() {
|
980
980
|
return on || (on = 1, process.env.NODE_ENV !== "production" && function() {
|
981
|
-
var e = Nn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), r = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"),
|
982
|
-
function
|
981
|
+
var e = Nn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), t = Symbol.for("react.fragment"), i = Symbol.for("react.strict_mode"), c = Symbol.for("react.profiler"), l = Symbol.for("react.provider"), r = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), f = Symbol.for("react.memo"), g = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), P = Symbol.iterator, V = "@@iterator";
|
982
|
+
function ee(s) {
|
983
983
|
if (s === null || typeof s != "object")
|
984
984
|
return null;
|
985
|
-
var p =
|
985
|
+
var p = P && s[P] || s[V];
|
986
986
|
return typeof p == "function" ? p : null;
|
987
987
|
}
|
988
|
-
var
|
989
|
-
function
|
988
|
+
var A = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
989
|
+
function $(s) {
|
990
990
|
{
|
991
991
|
for (var p = arguments.length, y = new Array(p > 1 ? p - 1 : 0), w = 1; w < p; w++)
|
992
992
|
y[w - 1] = arguments[w];
|
993
|
-
|
993
|
+
L("error", s, y);
|
994
994
|
}
|
995
995
|
}
|
996
|
-
function
|
996
|
+
function L(s, p, y) {
|
997
997
|
{
|
998
|
-
var w =
|
999
|
-
|
1000
|
-
var
|
1001
|
-
return String(
|
998
|
+
var w = A.ReactDebugCurrentFrame, F = w.getStackAddendum();
|
999
|
+
F !== "" && (p += "%s", y = y.concat([F]));
|
1000
|
+
var G = y.map(function(j) {
|
1001
|
+
return String(j);
|
1002
1002
|
});
|
1003
|
-
|
1003
|
+
G.unshift("Warning: " + p), Function.prototype.apply.call(console[s], console, G);
|
1004
1004
|
}
|
1005
1005
|
}
|
1006
|
-
var
|
1007
|
-
|
1006
|
+
var X = !1, ie = !1, Ce = !1, W = !1, pe = !1, ce;
|
1007
|
+
ce = Symbol.for("react.module.reference");
|
1008
1008
|
function Re(s) {
|
1009
|
-
return !!(typeof s == "string" || typeof s == "function" || s === t || s === c || pe || s === i || s === h || s === m ||
|
1009
|
+
return !!(typeof s == "string" || typeof s == "function" || s === t || s === c || pe || s === i || s === h || s === m || W || s === S || X || ie || Ce || typeof s == "object" && s !== null && (s.$$typeof === g || s.$$typeof === f || s.$$typeof === l || s.$$typeof === r || s.$$typeof === d || // This needs to include all possible module reference object
|
1010
1010
|
// types supported by any Flight configuration anywhere since
|
1011
1011
|
// we don't know which Flight build this will end up being used
|
1012
1012
|
// with.
|
1013
|
-
s.$$typeof ===
|
1013
|
+
s.$$typeof === ce || s.getModuleId !== void 0));
|
1014
1014
|
}
|
1015
1015
|
function ke(s, p, y) {
|
1016
1016
|
var w = s.displayName;
|
1017
1017
|
if (w)
|
1018
1018
|
return w;
|
1019
|
-
var
|
1020
|
-
return
|
1019
|
+
var F = p.displayName || p.name || "";
|
1020
|
+
return F !== "" ? y + "(" + F + ")" : y;
|
1021
1021
|
}
|
1022
1022
|
function ve(s) {
|
1023
1023
|
return s.displayName || "Context";
|
1024
1024
|
}
|
1025
|
-
function
|
1025
|
+
function B(s) {
|
1026
1026
|
if (s == null)
|
1027
1027
|
return null;
|
1028
|
-
if (typeof s.tag == "number" &&
|
1028
|
+
if (typeof s.tag == "number" && $("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof s == "function")
|
1029
1029
|
return s.displayName || s.name || null;
|
1030
1030
|
if (typeof s == "string")
|
1031
1031
|
return s;
|
@@ -1055,11 +1055,11 @@ function Fa() {
|
|
1055
1055
|
return ke(s, s.render, "ForwardRef");
|
1056
1056
|
case f:
|
1057
1057
|
var w = s.displayName || null;
|
1058
|
-
return w !== null ? w :
|
1059
|
-
case
|
1060
|
-
var
|
1058
|
+
return w !== null ? w : B(s.type) || "Memo";
|
1059
|
+
case g: {
|
1060
|
+
var F = s, G = F._payload, j = F._init;
|
1061
1061
|
try {
|
1062
|
-
return
|
1062
|
+
return B(j(G));
|
1063
1063
|
} catch {
|
1064
1064
|
return null;
|
1065
1065
|
}
|
@@ -1071,7 +1071,7 @@ function Fa() {
|
|
1071
1071
|
function Fe() {
|
1072
1072
|
}
|
1073
1073
|
Fe.__reactDisabledLog = !0;
|
1074
|
-
function
|
1074
|
+
function re() {
|
1075
1075
|
{
|
1076
1076
|
if (O === 0) {
|
1077
1077
|
we = console.log, De = console.info, Ie = console.warn, Pe = console.error, Ae = console.group, je = console.groupCollapsed, Be = console.groupEnd;
|
@@ -1126,65 +1126,65 @@ function Fa() {
|
|
1126
1126
|
})
|
1127
1127
|
});
|
1128
1128
|
}
|
1129
|
-
O < 0 &&
|
1129
|
+
O < 0 && $("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
1130
1130
|
}
|
1131
1131
|
}
|
1132
|
-
var He =
|
1133
|
-
function
|
1132
|
+
var He = A.ReactCurrentDispatcher, Ve;
|
1133
|
+
function ue(s, p, y) {
|
1134
1134
|
{
|
1135
1135
|
if (Ve === void 0)
|
1136
1136
|
try {
|
1137
1137
|
throw Error();
|
1138
|
-
} catch (
|
1139
|
-
var w =
|
1138
|
+
} catch (F) {
|
1139
|
+
var w = F.stack.trim().match(/\n( *(at )?)/);
|
1140
1140
|
Ve = w && w[1] || "";
|
1141
1141
|
}
|
1142
1142
|
return `
|
1143
1143
|
` + Ve + s;
|
1144
1144
|
}
|
1145
1145
|
}
|
1146
|
-
var
|
1146
|
+
var v = !1, b;
|
1147
1147
|
{
|
1148
1148
|
var M = typeof WeakMap == "function" ? WeakMap : Map;
|
1149
|
-
|
1149
|
+
b = new M();
|
1150
1150
|
}
|
1151
|
-
function
|
1152
|
-
if (!s ||
|
1151
|
+
function I(s, p) {
|
1152
|
+
if (!s || v)
|
1153
1153
|
return "";
|
1154
1154
|
{
|
1155
|
-
var y =
|
1155
|
+
var y = b.get(s);
|
1156
1156
|
if (y !== void 0)
|
1157
1157
|
return y;
|
1158
1158
|
}
|
1159
1159
|
var w;
|
1160
|
-
|
1161
|
-
var
|
1160
|
+
v = !0;
|
1161
|
+
var F = Error.prepareStackTrace;
|
1162
1162
|
Error.prepareStackTrace = void 0;
|
1163
|
-
var
|
1164
|
-
|
1163
|
+
var G;
|
1164
|
+
G = He.current, He.current = null, re();
|
1165
1165
|
try {
|
1166
1166
|
if (p) {
|
1167
|
-
var
|
1167
|
+
var j = function() {
|
1168
1168
|
throw Error();
|
1169
1169
|
};
|
1170
|
-
if (Object.defineProperty(
|
1170
|
+
if (Object.defineProperty(j.prototype, "props", {
|
1171
1171
|
set: function() {
|
1172
1172
|
throw Error();
|
1173
1173
|
}
|
1174
1174
|
}), typeof Reflect == "object" && Reflect.construct) {
|
1175
1175
|
try {
|
1176
|
-
Reflect.construct(
|
1176
|
+
Reflect.construct(j, []);
|
1177
1177
|
} catch (Le) {
|
1178
1178
|
w = Le;
|
1179
1179
|
}
|
1180
|
-
Reflect.construct(s, [],
|
1180
|
+
Reflect.construct(s, [], j);
|
1181
1181
|
} else {
|
1182
1182
|
try {
|
1183
|
-
|
1183
|
+
j.call();
|
1184
1184
|
} catch (Le) {
|
1185
1185
|
w = Le;
|
1186
1186
|
}
|
1187
|
-
s.call(
|
1187
|
+
s.call(j.prototype);
|
1188
1188
|
}
|
1189
1189
|
} else {
|
1190
1190
|
try {
|
@@ -1196,33 +1196,33 @@ function Fa() {
|
|
1196
1196
|
}
|
1197
1197
|
} catch (Le) {
|
1198
1198
|
if (Le && w && typeof Le.stack == "string") {
|
1199
|
-
for (var
|
1200
|
-
`),
|
1201
|
-
`),
|
1202
|
-
|
1203
|
-
for (;
|
1204
|
-
if (
|
1205
|
-
if (
|
1199
|
+
for (var D = Le.stack.split(`
|
1200
|
+
`), he = w.stack.split(`
|
1201
|
+
`), J = D.length - 1, ne = he.length - 1; J >= 1 && ne >= 0 && D[J] !== he[ne]; )
|
1202
|
+
ne--;
|
1203
|
+
for (; J >= 1 && ne >= 0; J--, ne--)
|
1204
|
+
if (D[J] !== he[ne]) {
|
1205
|
+
if (J !== 1 || ne !== 1)
|
1206
1206
|
do
|
1207
|
-
if (
|
1207
|
+
if (J--, ne--, ne < 0 || D[J] !== he[ne]) {
|
1208
1208
|
var Se = `
|
1209
|
-
` +
|
1210
|
-
return s.displayName && Se.includes("<anonymous>") && (Se = Se.replace("<anonymous>", s.displayName)), typeof s == "function" &&
|
1209
|
+
` + D[J].replace(" at new ", " at ");
|
1210
|
+
return s.displayName && Se.includes("<anonymous>") && (Se = Se.replace("<anonymous>", s.displayName)), typeof s == "function" && b.set(s, Se), Se;
|
1211
1211
|
}
|
1212
|
-
while (
|
1212
|
+
while (J >= 1 && ne >= 0);
|
1213
1213
|
break;
|
1214
1214
|
}
|
1215
1215
|
}
|
1216
1216
|
} finally {
|
1217
|
-
|
1217
|
+
v = !1, He.current = G, Me(), Error.prepareStackTrace = F;
|
1218
1218
|
}
|
1219
|
-
var tt = s ? s.displayName || s.name : "", Yt = tt ?
|
1220
|
-
return typeof s == "function" &&
|
1219
|
+
var tt = s ? s.displayName || s.name : "", Yt = tt ? ue(tt) : "";
|
1220
|
+
return typeof s == "function" && b.set(s, Yt), Yt;
|
1221
1221
|
}
|
1222
1222
|
function ge(s, p, y) {
|
1223
|
-
return
|
1223
|
+
return I(s, !1);
|
1224
1224
|
}
|
1225
|
-
function
|
1225
|
+
function le(s) {
|
1226
1226
|
var p = s.prototype;
|
1227
1227
|
return !!(p && p.isReactComponent);
|
1228
1228
|
}
|
@@ -1230,14 +1230,14 @@ function Fa() {
|
|
1230
1230
|
if (s == null)
|
1231
1231
|
return "";
|
1232
1232
|
if (typeof s == "function")
|
1233
|
-
return
|
1233
|
+
return I(s, le(s));
|
1234
1234
|
if (typeof s == "string")
|
1235
|
-
return
|
1235
|
+
return ue(s);
|
1236
1236
|
switch (s) {
|
1237
1237
|
case h:
|
1238
|
-
return
|
1238
|
+
return ue("Suspense");
|
1239
1239
|
case m:
|
1240
|
-
return
|
1240
|
+
return ue("SuspenseList");
|
1241
1241
|
}
|
1242
1242
|
if (typeof s == "object")
|
1243
1243
|
switch (s.$$typeof) {
|
@@ -1245,46 +1245,46 @@ function Fa() {
|
|
1245
1245
|
return ge(s.render);
|
1246
1246
|
case f:
|
1247
1247
|
return C(s.type, p, y);
|
1248
|
-
case
|
1249
|
-
var w = s,
|
1248
|
+
case g: {
|
1249
|
+
var w = s, F = w._payload, G = w._init;
|
1250
1250
|
try {
|
1251
|
-
return C(
|
1251
|
+
return C(G(F), p, y);
|
1252
1252
|
} catch {
|
1253
1253
|
}
|
1254
1254
|
}
|
1255
1255
|
}
|
1256
1256
|
return "";
|
1257
1257
|
}
|
1258
|
-
var x = Object.prototype.hasOwnProperty,
|
1258
|
+
var x = Object.prototype.hasOwnProperty, z = {}, te = A.ReactDebugCurrentFrame;
|
1259
1259
|
function T(s) {
|
1260
1260
|
if (s) {
|
1261
1261
|
var p = s._owner, y = C(s.type, s._source, p ? p.type : null);
|
1262
|
-
|
1262
|
+
te.setExtraStackFrame(y);
|
1263
1263
|
} else
|
1264
|
-
|
1264
|
+
te.setExtraStackFrame(null);
|
1265
1265
|
}
|
1266
|
-
function
|
1266
|
+
function U(s, p, y, w, F) {
|
1267
1267
|
{
|
1268
|
-
var
|
1269
|
-
for (var
|
1270
|
-
if (
|
1271
|
-
var
|
1268
|
+
var G = Function.call.bind(x);
|
1269
|
+
for (var j in s)
|
1270
|
+
if (G(s, j)) {
|
1271
|
+
var D = void 0;
|
1272
1272
|
try {
|
1273
|
-
if (typeof s[
|
1274
|
-
var
|
1275
|
-
throw
|
1273
|
+
if (typeof s[j] != "function") {
|
1274
|
+
var he = Error((w || "React class") + ": " + y + " type `" + j + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof s[j] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
1275
|
+
throw he.name = "Invariant Violation", he;
|
1276
1276
|
}
|
1277
|
-
|
1278
|
-
} catch (
|
1279
|
-
|
1277
|
+
D = s[j](p, j, w, y, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
1278
|
+
} catch (J) {
|
1279
|
+
D = J;
|
1280
1280
|
}
|
1281
|
-
|
1281
|
+
D && !(D instanceof Error) && (T(F), $("%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).", w || "React class", y, j, typeof D), T(null)), D instanceof Error && !(D.message in z) && (z[D.message] = !0, T(F), $("Failed %s type: %s", y, D.message), T(null));
|
1282
1282
|
}
|
1283
1283
|
}
|
1284
1284
|
}
|
1285
|
-
var
|
1285
|
+
var H = Array.isArray;
|
1286
1286
|
function Ne(s) {
|
1287
|
-
return
|
1287
|
+
return H(s);
|
1288
1288
|
}
|
1289
1289
|
function Je(s) {
|
1290
1290
|
{
|
@@ -1304,9 +1304,9 @@ function Fa() {
|
|
1304
1304
|
}
|
1305
1305
|
function st(s) {
|
1306
1306
|
if (mt(s))
|
1307
|
-
return
|
1307
|
+
return $("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", Je(s)), pt(s);
|
1308
1308
|
}
|
1309
|
-
var Ue =
|
1309
|
+
var Ue = A.ReactCurrentOwner, ot = {
|
1310
1310
|
key: !0,
|
1311
1311
|
ref: !0,
|
1312
1312
|
__self: !0,
|
@@ -1331,14 +1331,14 @@ function Fa() {
|
|
1331
1331
|
}
|
1332
1332
|
function Pt(s, p) {
|
1333
1333
|
if (typeof s.ref == "string" && Ue.current && p && Ue.current.stateNode !== p) {
|
1334
|
-
var y =
|
1335
|
-
Qe[y] || (
|
1334
|
+
var y = B(Ue.current.type);
|
1335
|
+
Qe[y] || ($('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', B(Ue.current.type), s.ref), Qe[y] = !0);
|
1336
1336
|
}
|
1337
1337
|
}
|
1338
1338
|
function vt(s, p) {
|
1339
1339
|
{
|
1340
1340
|
var y = function() {
|
1341
|
-
ct || (ct = !0,
|
1341
|
+
ct || (ct = !0, $("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
1342
1342
|
};
|
1343
1343
|
y.isReactWarning = !0, Object.defineProperty(s, "key", {
|
1344
1344
|
get: y,
|
@@ -1349,7 +1349,7 @@ function Fa() {
|
|
1349
1349
|
function $e(s, p) {
|
1350
1350
|
{
|
1351
1351
|
var y = function() {
|
1352
|
-
gt || (gt = !0,
|
1352
|
+
gt || (gt = !0, $("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", p));
|
1353
1353
|
};
|
1354
1354
|
y.isReactWarning = !0, Object.defineProperty(s, "ref", {
|
1355
1355
|
get: y,
|
@@ -1357,70 +1357,70 @@ function Fa() {
|
|
1357
1357
|
});
|
1358
1358
|
}
|
1359
1359
|
}
|
1360
|
-
var Ht = function(s, p, y, w,
|
1361
|
-
var
|
1360
|
+
var Ht = function(s, p, y, w, F, G, j) {
|
1361
|
+
var D = {
|
1362
1362
|
// This tag allows us to uniquely identify this as a React Element
|
1363
1363
|
$$typeof: n,
|
1364
1364
|
// Built-in properties that belong on the element
|
1365
1365
|
type: s,
|
1366
1366
|
key: p,
|
1367
1367
|
ref: y,
|
1368
|
-
props:
|
1368
|
+
props: j,
|
1369
1369
|
// Record the component responsible for creating this element.
|
1370
|
-
_owner:
|
1370
|
+
_owner: G
|
1371
1371
|
};
|
1372
|
-
return
|
1372
|
+
return D._store = {}, Object.defineProperty(D._store, "validated", {
|
1373
1373
|
configurable: !1,
|
1374
1374
|
enumerable: !1,
|
1375
1375
|
writable: !0,
|
1376
1376
|
value: !1
|
1377
|
-
}), Object.defineProperty(
|
1377
|
+
}), Object.defineProperty(D, "_self", {
|
1378
1378
|
configurable: !1,
|
1379
1379
|
enumerable: !1,
|
1380
1380
|
writable: !1,
|
1381
1381
|
value: w
|
1382
|
-
}), Object.defineProperty(
|
1382
|
+
}), Object.defineProperty(D, "_source", {
|
1383
1383
|
configurable: !1,
|
1384
1384
|
enumerable: !1,
|
1385
1385
|
writable: !1,
|
1386
|
-
value:
|
1387
|
-
}), Object.freeze && (Object.freeze(
|
1386
|
+
value: F
|
1387
|
+
}), Object.freeze && (Object.freeze(D.props), Object.freeze(D)), D;
|
1388
1388
|
};
|
1389
|
-
function o(s, p, y, w,
|
1389
|
+
function o(s, p, y, w, F) {
|
1390
1390
|
{
|
1391
|
-
var
|
1392
|
-
y !== void 0 && (st(y),
|
1393
|
-
for (
|
1394
|
-
x.call(p,
|
1391
|
+
var G, j = {}, D = null, he = null;
|
1392
|
+
y !== void 0 && (st(y), D = "" + y), Dt(p) && (st(p.key), D = "" + p.key), kt(p) && (he = p.ref, Pt(p, F));
|
1393
|
+
for (G in p)
|
1394
|
+
x.call(p, G) && !ot.hasOwnProperty(G) && (j[G] = p[G]);
|
1395
1395
|
if (s && s.defaultProps) {
|
1396
|
-
var
|
1397
|
-
for (
|
1398
|
-
|
1396
|
+
var J = s.defaultProps;
|
1397
|
+
for (G in J)
|
1398
|
+
j[G] === void 0 && (j[G] = J[G]);
|
1399
1399
|
}
|
1400
|
-
if (
|
1401
|
-
var
|
1402
|
-
|
1400
|
+
if (D || he) {
|
1401
|
+
var ne = typeof s == "function" ? s.displayName || s.name || "Unknown" : s;
|
1402
|
+
D && vt(j, ne), he && $e(j, ne);
|
1403
1403
|
}
|
1404
|
-
return Ht(s,
|
1404
|
+
return Ht(s, D, he, F, w, Ue.current, j);
|
1405
1405
|
}
|
1406
1406
|
}
|
1407
|
-
var E =
|
1408
|
-
function
|
1407
|
+
var E = A.ReactCurrentOwner, _ = A.ReactDebugCurrentFrame;
|
1408
|
+
function N(s) {
|
1409
1409
|
if (s) {
|
1410
1410
|
var p = s._owner, y = C(s.type, s._source, p ? p.type : null);
|
1411
1411
|
_.setExtraStackFrame(y);
|
1412
1412
|
} else
|
1413
1413
|
_.setExtraStackFrame(null);
|
1414
1414
|
}
|
1415
|
-
var
|
1416
|
-
|
1415
|
+
var ae;
|
1416
|
+
ae = !1;
|
1417
1417
|
function ye(s) {
|
1418
1418
|
return typeof s == "object" && s !== null && s.$$typeof === n;
|
1419
1419
|
}
|
1420
|
-
function
|
1420
|
+
function de() {
|
1421
1421
|
{
|
1422
1422
|
if (E.current) {
|
1423
|
-
var s =
|
1423
|
+
var s = B(E.current.type);
|
1424
1424
|
if (s)
|
1425
1425
|
return `
|
1426
1426
|
|
@@ -1443,7 +1443,7 @@ Check your code at ` + p + ":" + y + ".";
|
|
1443
1443
|
var bt = {};
|
1444
1444
|
function yt(s) {
|
1445
1445
|
{
|
1446
|
-
var p =
|
1446
|
+
var p = de();
|
1447
1447
|
if (!p) {
|
1448
1448
|
var y = typeof s == "string" ? s : s.displayName || s.name;
|
1449
1449
|
y && (p = `
|
@@ -1463,7 +1463,7 @@ Check the top-level render call using <` + y + ">.");
|
|
1463
1463
|
return;
|
1464
1464
|
bt[y] = !0;
|
1465
1465
|
var w = "";
|
1466
|
-
s && s._owner && s._owner !== E.current && (w = " It was passed a child from " +
|
1466
|
+
s && s._owner && s._owner !== E.current && (w = " It was passed a child from " + B(s._owner.type) + "."), N(s), $('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', y, w), N(null);
|
1467
1467
|
}
|
1468
1468
|
}
|
1469
1469
|
function xe(s, p) {
|
@@ -1478,10 +1478,10 @@ Check the top-level render call using <` + y + ">.");
|
|
1478
1478
|
else if (ye(s))
|
1479
1479
|
s._store && (s._store.validated = !0);
|
1480
1480
|
else if (s) {
|
1481
|
-
var
|
1482
|
-
if (typeof
|
1483
|
-
for (var
|
1484
|
-
ye(
|
1481
|
+
var F = ee(s);
|
1482
|
+
if (typeof F == "function" && F !== s.entries)
|
1483
|
+
for (var G = F.call(s), j; !(j = G.next()).done; )
|
1484
|
+
ye(j.value) && Ee(j.value, p);
|
1485
1485
|
}
|
1486
1486
|
}
|
1487
1487
|
}
|
@@ -1500,14 +1500,14 @@ Check the top-level render call using <` + y + ">.");
|
|
1500
1500
|
else
|
1501
1501
|
return;
|
1502
1502
|
if (y) {
|
1503
|
-
var w =
|
1504
|
-
|
1505
|
-
} else if (p.PropTypes !== void 0 && !
|
1506
|
-
|
1507
|
-
var
|
1508
|
-
|
1503
|
+
var w = B(p);
|
1504
|
+
U(y, s.props, "prop", w, s);
|
1505
|
+
} else if (p.PropTypes !== void 0 && !ae) {
|
1506
|
+
ae = !0;
|
1507
|
+
var F = B(p);
|
1508
|
+
$("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", F || "Unknown");
|
1509
1509
|
}
|
1510
|
-
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved &&
|
1510
|
+
typeof p.getDefaultProps == "function" && !p.getDefaultProps.isReactClassApproved && $("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1511
1511
|
}
|
1512
1512
|
}
|
1513
1513
|
function Oe(s) {
|
@@ -1515,28 +1515,28 @@ Check the top-level render call using <` + y + ">.");
|
|
1515
1515
|
for (var p = Object.keys(s.props), y = 0; y < p.length; y++) {
|
1516
1516
|
var w = p[y];
|
1517
1517
|
if (w !== "children" && w !== "key") {
|
1518
|
-
|
1518
|
+
N(s), $("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), N(null);
|
1519
1519
|
break;
|
1520
1520
|
}
|
1521
1521
|
}
|
1522
|
-
s.ref !== null && (
|
1522
|
+
s.ref !== null && (N(s), $("Invalid attribute `ref` supplied to `React.Fragment`."), N(null));
|
1523
1523
|
}
|
1524
1524
|
}
|
1525
|
-
function ze(s, p, y, w,
|
1525
|
+
function ze(s, p, y, w, F, G) {
|
1526
1526
|
{
|
1527
|
-
var
|
1528
|
-
if (!
|
1529
|
-
var
|
1530
|
-
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (
|
1531
|
-
var
|
1532
|
-
|
1533
|
-
var
|
1534
|
-
s === null ?
|
1527
|
+
var j = Re(s);
|
1528
|
+
if (!j) {
|
1529
|
+
var D = "";
|
1530
|
+
(s === void 0 || typeof s == "object" && s !== null && Object.keys(s).length === 0) && (D += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1531
|
+
var he = Vt(F);
|
1532
|
+
he ? D += he : D += de();
|
1533
|
+
var J;
|
1534
|
+
s === null ? J = "null" : Ne(s) ? J = "array" : s !== void 0 && s.$$typeof === n ? (J = "<" + (B(s.type) || "Unknown") + " />", D = " Did you accidentally export a JSX literal instead of a component?") : J = typeof s, $("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", J, D);
|
1535
1535
|
}
|
1536
|
-
var
|
1537
|
-
if (
|
1538
|
-
return
|
1539
|
-
if (
|
1536
|
+
var ne = o(s, p, y, F, G);
|
1537
|
+
if (ne == null)
|
1538
|
+
return ne;
|
1539
|
+
if (j) {
|
1540
1540
|
var Se = p.children;
|
1541
1541
|
if (Se !== void 0)
|
1542
1542
|
if (w)
|
@@ -1545,11 +1545,11 @@ Check the top-level render call using <` + y + ">.");
|
|
1545
1545
|
xe(Se[tt], s);
|
1546
1546
|
Object.freeze && Object.freeze(Se);
|
1547
1547
|
} else
|
1548
|
-
|
1548
|
+
$("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1549
1549
|
else
|
1550
1550
|
xe(Se, s);
|
1551
1551
|
}
|
1552
|
-
return s === t ? Oe(
|
1552
|
+
return s === t ? Oe(ne) : Ye(ne), ne;
|
1553
1553
|
}
|
1554
1554
|
}
|
1555
1555
|
function et(s, p, y) {
|
@@ -1589,7 +1589,7 @@ function za(e) {
|
|
1589
1589
|
] }) }, e.title);
|
1590
1590
|
}
|
1591
1591
|
function Ga(e) {
|
1592
|
-
const [n, a] =
|
1592
|
+
const [n, a] = K(!1), [t, i] = K(e.options), c = (h) => {
|
1593
1593
|
e.onDragComplete(h), i(h);
|
1594
1594
|
}, l = (h) => {
|
1595
1595
|
const m = [...t];
|
@@ -1605,7 +1605,7 @@ function Ga(e) {
|
|
1605
1605
|
] });
|
1606
1606
|
}
|
1607
1607
|
function Wa(e) {
|
1608
|
-
const [n, a] =
|
1608
|
+
const [n, a] = K(!1), t = [];
|
1609
1609
|
e.options.map((c, l) => {
|
1610
1610
|
e.onSelect !== void 0 && (c.onSelect = e.onSelect), t.push(/* @__PURE__ */ u.jsx(Ha, { option: c }, l));
|
1611
1611
|
});
|
@@ -1630,7 +1630,7 @@ function Wa(e) {
|
|
1630
1630
|
);
|
1631
1631
|
}
|
1632
1632
|
function Ha(e) {
|
1633
|
-
const { option: n } = e, [a, t] =
|
1633
|
+
const { option: n } = e, [a, t] = K("");
|
1634
1634
|
let i;
|
1635
1635
|
switch (n.type) {
|
1636
1636
|
case "draggable":
|
@@ -1695,7 +1695,7 @@ function Bi(e, n, a) {
|
|
1695
1695
|
};
|
1696
1696
|
}
|
1697
1697
|
function Wt(e) {
|
1698
|
-
const [n, a] =
|
1698
|
+
const [n, a] = K(e.open !== void 0 ? e.open : !0), t = !n || e.children === void 0;
|
1699
1699
|
return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${t ? "hide" : ""}`, children: [
|
1700
1700
|
/* @__PURE__ */ u.jsxs(
|
1701
1701
|
"button",
|
@@ -1722,7 +1722,7 @@ function Wt(e) {
|
|
1722
1722
|
] });
|
1723
1723
|
}
|
1724
1724
|
function Un(e) {
|
1725
|
-
const n =
|
1725
|
+
const n = Z(null), [a, t] = K(!1), i = e.child !== void 0 && e.child.children.length > 0, c = [];
|
1726
1726
|
return e.child !== void 0 && e.child.children.length > 0 && e.child.children.map((l, r) => {
|
1727
1727
|
c.push(/* @__PURE__ */ u.jsx(Un, { child: l, three: e.three }, r));
|
1728
1728
|
}), _e(() => {
|
@@ -1770,7 +1770,7 @@ function Un(e) {
|
|
1770
1770
|
const r = l.getObjectByProperty("uuid", e.child.uuid);
|
1771
1771
|
if (r !== void 0) {
|
1772
1772
|
const d = "visible", h = !r.visible;
|
1773
|
-
n.current.style.opacity = h ? "1" : "0.25", e.three.updateObject(e.child.uuid, d, h),
|
1773
|
+
n.current.style.opacity = h ? "1" : "0.25", e.three.updateObject(e.child.uuid, d, h), Q(r, d, h);
|
1774
1774
|
}
|
1775
1775
|
}
|
1776
1776
|
}
|
@@ -2257,7 +2257,7 @@ function ai(e, n, a, t) {
|
|
2257
2257
|
const l = t.getScene(a.uuid);
|
2258
2258
|
if (l !== null) {
|
2259
2259
|
const r = l.getObjectByProperty("uuid", a.uuid);
|
2260
|
-
r !== void 0 &&
|
2260
|
+
r !== void 0 && Q(r, `material.${e}`, c);
|
2261
2261
|
}
|
2262
2262
|
}
|
2263
2263
|
};
|
@@ -2277,7 +2277,7 @@ function ii(e, n, a, t) {
|
|
2277
2277
|
const r = t.getScene(a.uuid);
|
2278
2278
|
if (r !== null) {
|
2279
2279
|
const d = r.getObjectByProperty("uuid", a.uuid);
|
2280
|
-
d !== void 0 &&
|
2280
|
+
d !== void 0 && Q(d, `material.${e}`, l);
|
2281
2281
|
}
|
2282
2282
|
}
|
2283
2283
|
};
|
@@ -2312,7 +2312,7 @@ function ri(e, n, a, t) {
|
|
2312
2312
|
const d = t.getScene(a.uuid);
|
2313
2313
|
if (d !== null) {
|
2314
2314
|
const h = d.getObjectByProperty("uuid", a.uuid);
|
2315
|
-
h !== void 0 &&
|
2315
|
+
h !== void 0 && Q(h, `material.${e}`, r);
|
2316
2316
|
}
|
2317
2317
|
},
|
2318
2318
|
onKeyDown: (l) => {
|
@@ -2323,7 +2323,7 @@ function ri(e, n, a, t) {
|
|
2323
2323
|
const d = t.getScene(a.uuid);
|
2324
2324
|
if (d !== null) {
|
2325
2325
|
const h = d.getObjectByProperty("uuid", a.uuid);
|
2326
|
-
h !== void 0 &&
|
2326
|
+
h !== void 0 && Q(h, `material.${e}`, r);
|
2327
2327
|
}
|
2328
2328
|
}, i.onKeyDown = (l) => {
|
2329
2329
|
if (l.key === "Enter" && (l.altKey || l.metaKey)) {
|
@@ -2331,7 +2331,7 @@ function ri(e, n, a, t) {
|
|
2331
2331
|
const r = t.getScene(a.uuid);
|
2332
2332
|
if (r !== null) {
|
2333
2333
|
const d = r.getObjectByProperty("uuid", a.uuid);
|
2334
|
-
d !== void 0 &&
|
2334
|
+
d !== void 0 && Q(d, "material.needsUpdate", !0);
|
2335
2335
|
}
|
2336
2336
|
}
|
2337
2337
|
}), i;
|
@@ -2361,8 +2361,8 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2361
2361
|
t.updateObject(a.uuid, `material.${r}`, m);
|
2362
2362
|
const f = t.getScene(a.uuid);
|
2363
2363
|
if (f !== null) {
|
2364
|
-
const
|
2365
|
-
|
2364
|
+
const g = f.getObjectByProperty("uuid", a.uuid);
|
2365
|
+
g !== void 0 && Q(g, `material.${r}`, m);
|
2366
2366
|
}
|
2367
2367
|
}
|
2368
2368
|
};
|
@@ -2376,10 +2376,10 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2376
2376
|
disabled: c,
|
2377
2377
|
onChange: (m, f) => {
|
2378
2378
|
t.updateObject(a.uuid, `material.${r}`, f);
|
2379
|
-
const
|
2380
|
-
if (
|
2381
|
-
const S =
|
2382
|
-
S !== void 0 &&
|
2379
|
+
const g = t.getScene(a.uuid);
|
2380
|
+
if (g !== null) {
|
2381
|
+
const S = g.getObjectByProperty("uuid", a.uuid);
|
2382
|
+
S !== void 0 && Q(S, `material.${r}`, f);
|
2383
2383
|
}
|
2384
2384
|
}
|
2385
2385
|
};
|
@@ -2395,22 +2395,22 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2395
2395
|
onChange: (h, m) => {
|
2396
2396
|
const f = new $t(m);
|
2397
2397
|
t.updateObject(a.uuid, `material.${r}`, f);
|
2398
|
-
const
|
2399
|
-
if (
|
2400
|
-
const S =
|
2401
|
-
S !== void 0 &&
|
2398
|
+
const g = t.getScene(a.uuid);
|
2399
|
+
if (g !== null) {
|
2400
|
+
const S = g.getObjectByProperty("uuid", a.uuid);
|
2401
|
+
S !== void 0 && Q(S, `material.${r}`, f);
|
2402
2402
|
}
|
2403
2403
|
}
|
2404
2404
|
};
|
2405
2405
|
if (Array.isArray(n)) {
|
2406
2406
|
const h = [];
|
2407
2407
|
for (const m in n) {
|
2408
|
-
const f = n[m],
|
2408
|
+
const f = n[m], g = `[${m.toString()}]`;
|
2409
2409
|
if (f.value !== void 0) {
|
2410
|
-
const S = ht(`${
|
2410
|
+
const S = ht(`${g}.value`, f.value, a, t, r, c);
|
2411
2411
|
S !== void 0 && h.push(S);
|
2412
2412
|
} else {
|
2413
|
-
const S = ht(
|
2413
|
+
const S = ht(g, f, a, t, r, c);
|
2414
2414
|
S !== void 0 && h.push(S);
|
2415
2415
|
}
|
2416
2416
|
}
|
@@ -2431,8 +2431,8 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2431
2431
|
t.updateObject(a.uuid, `material.${r}`, m);
|
2432
2432
|
const f = t.getScene(a.uuid);
|
2433
2433
|
if (f !== null) {
|
2434
|
-
const
|
2435
|
-
|
2434
|
+
const g = f.getObjectByProperty("uuid", a.uuid);
|
2435
|
+
g !== void 0 && Q(g, `material.${r}`, m);
|
2436
2436
|
}
|
2437
2437
|
}
|
2438
2438
|
};
|
@@ -2447,8 +2447,8 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2447
2447
|
t.updateObject(a.uuid, `material.${r}`, m);
|
2448
2448
|
const f = t.getScene(a.uuid);
|
2449
2449
|
if (f !== null) {
|
2450
|
-
const
|
2451
|
-
|
2450
|
+
const g = f.getObjectByProperty("uuid", a.uuid);
|
2451
|
+
g !== void 0 && Q(g, `material.${r}`, m);
|
2452
2452
|
}
|
2453
2453
|
}
|
2454
2454
|
};
|
@@ -2463,8 +2463,8 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2463
2463
|
t.updateObject(a.uuid, `material.${r}`, m);
|
2464
2464
|
const f = t.getScene(a.uuid);
|
2465
2465
|
if (f !== null) {
|
2466
|
-
const
|
2467
|
-
|
2466
|
+
const g = f.getObjectByProperty("uuid", a.uuid);
|
2467
|
+
g !== void 0 && Q(g, `material.${r}`, m);
|
2468
2468
|
}
|
2469
2469
|
}
|
2470
2470
|
};
|
@@ -2479,8 +2479,8 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2479
2479
|
t.updateObject(a.uuid, `material.${r}`, m);
|
2480
2480
|
const f = t.getScene(a.uuid);
|
2481
2481
|
if (f !== null) {
|
2482
|
-
const
|
2483
|
-
|
2482
|
+
const g = f.getObjectByProperty("uuid", a.uuid);
|
2483
|
+
g !== void 0 && Q(g, `material.${r}`, m);
|
2484
2484
|
}
|
2485
2485
|
}
|
2486
2486
|
};
|
@@ -2491,13 +2491,31 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2491
2491
|
value: n,
|
2492
2492
|
disabled: c,
|
2493
2493
|
onChange: (h, m) => {
|
2494
|
-
const f = Za(e),
|
2495
|
-
t.createTexture(a.uuid, `material.${
|
2494
|
+
const f = Za(e), g = i.length > 0 ? `${i}.${f}` : f;
|
2495
|
+
t.createTexture(a.uuid, `material.${g}`, m);
|
2496
2496
|
const S = t.getScene(a.uuid);
|
2497
2497
|
if (S !== null) {
|
2498
|
-
const
|
2499
|
-
|
2500
|
-
|
2498
|
+
const P = S.getObjectByProperty("uuid", a.uuid);
|
2499
|
+
P !== void 0 && Bn(m).then((V) => {
|
2500
|
+
const ee = P.material, A = g.split(".");
|
2501
|
+
switch (A.length) {
|
2502
|
+
case 1:
|
2503
|
+
ee[A[0]] = V;
|
2504
|
+
break;
|
2505
|
+
case 2:
|
2506
|
+
ee[A[0]][A[1]] = V;
|
2507
|
+
break;
|
2508
|
+
case 3:
|
2509
|
+
ee[A[0]][A[1]][A[2]] = V;
|
2510
|
+
break;
|
2511
|
+
case 4:
|
2512
|
+
ee[A[0]][A[1]][A[2]][A[3]] = V;
|
2513
|
+
break;
|
2514
|
+
case 5:
|
2515
|
+
ee[A[0]][A[1]][A[2]][A[3]][A[4]] = V;
|
2516
|
+
break;
|
2517
|
+
}
|
2518
|
+
ee.needsUpdate = !0;
|
2501
2519
|
});
|
2502
2520
|
}
|
2503
2521
|
}
|
@@ -2513,8 +2531,8 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2513
2531
|
t.updateObject(a.uuid, `material.${r}`, m);
|
2514
2532
|
const f = t.getScene(a.uuid);
|
2515
2533
|
if (f !== null) {
|
2516
|
-
const
|
2517
|
-
|
2534
|
+
const g = f.getObjectByProperty("uuid", a.uuid);
|
2535
|
+
g !== void 0 && Q(g, `material.${r}`, m);
|
2518
2536
|
}
|
2519
2537
|
}
|
2520
2538
|
};
|
@@ -2522,13 +2540,13 @@ function ht(e, n, a, t, i = "", c = !1) {
|
|
2522
2540
|
const h = [], m = e === "defines" || e === "extensions";
|
2523
2541
|
try {
|
2524
2542
|
for (const f in n) {
|
2525
|
-
const
|
2526
|
-
if (
|
2527
|
-
if (
|
2528
|
-
const S = ht(`${f}.value`,
|
2543
|
+
const g = n[f];
|
2544
|
+
if (g !== void 0)
|
2545
|
+
if (g.value !== void 0) {
|
2546
|
+
const S = ht(`${f}.value`, g.value, a, t, r, m);
|
2529
2547
|
S !== void 0 && h.push(S);
|
2530
2548
|
} else {
|
2531
|
-
const S = ht(f,
|
2549
|
+
const S = ht(f, g, a, t, r, m);
|
2532
2550
|
S !== void 0 && h.push(S);
|
2533
2551
|
}
|
2534
2552
|
}
|
@@ -2570,7 +2588,7 @@ function cn(e, n, a) {
|
|
2570
2588
|
const i = a.getScene(n.uuid);
|
2571
2589
|
if (i !== null) {
|
2572
2590
|
const c = i.getObjectByProperty("uuid", n.uuid);
|
2573
|
-
c !== void 0 &&
|
2591
|
+
c !== void 0 && Q(c, "material.needsUpdate", !0);
|
2574
2592
|
}
|
2575
2593
|
}
|
2576
2594
|
}), t;
|
@@ -2601,23 +2619,23 @@ function li(e, n) {
|
|
2601
2619
|
);
|
2602
2620
|
}
|
2603
2621
|
function ui(e) {
|
2604
|
-
const [n, a] =
|
2622
|
+
const [n, a] = K(e.defaultValue);
|
2605
2623
|
return _e(() => {
|
2606
2624
|
let t = !1, i = -1, c = 0, l = e.defaultValue;
|
2607
|
-
const r = (
|
2608
|
-
t = !0, c = Number(e.input.current?.value), i =
|
2609
|
-
}, d = (
|
2625
|
+
const r = (g) => {
|
2626
|
+
t = !0, c = Number(e.input.current?.value), i = g.clientX, document.addEventListener("mouseup", h, !1), document.addEventListener("mousemove", d, !1), document.addEventListener("contextmenu", h, !1);
|
2627
|
+
}, d = (g) => {
|
2610
2628
|
if (!t)
|
2611
2629
|
return;
|
2612
|
-
const S = e.step !== void 0 ? e.step : 1,
|
2613
|
-
l = Number((c +
|
2630
|
+
const S = e.step !== void 0 ? e.step : 1, P = (g.clientX - i) * S;
|
2631
|
+
l = Number((c + P).toFixed(4)), e.min !== void 0 && (l = Math.max(l, e.min)), e.max !== void 0 && (l = Math.min(l, e.max)), e.onChange !== void 0 && e.onChange(l), a(l);
|
2614
2632
|
}, h = () => {
|
2615
2633
|
t = !1, document.removeEventListener("mouseup", h), document.removeEventListener("mousemove", d), document.removeEventListener("contextmenu", h);
|
2616
|
-
}, m = (
|
2617
|
-
const S = Number(
|
2634
|
+
}, m = (g) => {
|
2635
|
+
const S = Number(g.target.value);
|
2618
2636
|
a(S);
|
2619
|
-
}, f = (
|
2620
|
-
const S = Number(
|
2637
|
+
}, f = (g) => {
|
2638
|
+
const S = Number(g.target.value);
|
2621
2639
|
e.onChange !== void 0 && e.onChange(S), a(S);
|
2622
2640
|
};
|
2623
2641
|
return e.input.current?.addEventListener("input", m), e.label.current?.addEventListener("mousedown", r, !1), e.sliderRef !== void 0 && e.sliderRef.current?.addEventListener("input", f), () => {
|
@@ -2626,7 +2644,7 @@ function ui(e) {
|
|
2626
2644
|
}, []), n;
|
2627
2645
|
}
|
2628
2646
|
function Ze(e) {
|
2629
|
-
const n =
|
2647
|
+
const n = Z(null), a = Z(null), t = ui({
|
2630
2648
|
label: e.labelRef,
|
2631
2649
|
input: n,
|
2632
2650
|
sliderRef: a,
|
@@ -2689,35 +2707,35 @@ function Ze(e) {
|
|
2689
2707
|
] });
|
2690
2708
|
}
|
2691
2709
|
function di(e) {
|
2692
|
-
const n =
|
2710
|
+
const n = Z(null), a = Z(null), t = Z(null), i = Z(null), c = Z(null), l = Z(null), [r, d] = K(e.value), [h, m] = K({
|
2693
2711
|
min: Math.min(e.min, Math.min(e.value.x, e.value.y)),
|
2694
2712
|
max: Math.max(e.max, Math.max(e.value.x, e.value.y))
|
2695
|
-
}), [f,
|
2713
|
+
}), [f, g] = K(!1);
|
2696
2714
|
function S() {
|
2697
|
-
f || (window.addEventListener("mousemove",
|
2715
|
+
f || (window.addEventListener("mousemove", V), window.addEventListener("mouseup", P), window.addEventListener("mouseup", P), g(!0));
|
2698
2716
|
}
|
2699
|
-
function
|
2700
|
-
window.removeEventListener("mousemove",
|
2717
|
+
function P() {
|
2718
|
+
window.removeEventListener("mousemove", V), window.removeEventListener("mouseup", P), g(!1);
|
2701
2719
|
}
|
2702
|
-
function
|
2703
|
-
const
|
2704
|
-
e.onChange({ target: { value: { x:
|
2720
|
+
function V(L) {
|
2721
|
+
const X = c.current.getBoundingClientRect(), ie = Ke(0, 99, L.clientX - X.left) / 99, Ce = Ke(0, 99, L.clientY - X.top) / 99, W = an(nn(h.min, h.max, ie), 3), pe = an(nn(h.min, h.max, Ce), 3);
|
2722
|
+
e.onChange({ target: { value: { x: W, y: pe } } }), d({ x: W, y: pe });
|
2705
2723
|
}
|
2706
|
-
function
|
2707
|
-
let
|
2708
|
-
|
2724
|
+
function ee(L) {
|
2725
|
+
let X = r.x, ie = r.y;
|
2726
|
+
L.target === n.current ? X = Number(L.target.value) : ie = Number(L.target.value), d({ x: X, y: ie });
|
2709
2727
|
}
|
2710
|
-
function
|
2711
|
-
const
|
2712
|
-
m({ min:
|
2728
|
+
function A() {
|
2729
|
+
const L = Number(t.current.value);
|
2730
|
+
m({ min: L, max: h.max }), (r.x < L || r.y < L) && d({ x: Ke(L, h.max, r.x), y: Ke(L, h.max, r.y) });
|
2713
2731
|
}
|
2714
|
-
function
|
2715
|
-
const
|
2716
|
-
m({ min: h.min, max:
|
2732
|
+
function $() {
|
2733
|
+
const L = Number(i.current.value);
|
2734
|
+
m({ min: h.min, max: L }), (r.x > L || r.y > L) && d({ x: Ke(h.min, L, r.x), y: Ke(h.min, L, r.y) });
|
2717
2735
|
}
|
2718
2736
|
return _e(() => {
|
2719
|
-
const
|
2720
|
-
l.current.style.left = `${
|
2737
|
+
const L = tn(h.min, h.max, r.x), X = tn(h.min, h.max, r.y);
|
2738
|
+
l.current.style.left = `${L * 100}%`, l.current.style.top = `${X * 100}%`;
|
2721
2739
|
}, [h, r]), /* @__PURE__ */ u.jsxs("div", { className: "vector2", children: [
|
2722
2740
|
/* @__PURE__ */ u.jsxs("div", { className: "fields", children: [
|
2723
2741
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
@@ -2731,7 +2749,7 @@ function di(e) {
|
|
2731
2749
|
min: h.min,
|
2732
2750
|
max: h.max,
|
2733
2751
|
step: 0.01,
|
2734
|
-
onChange:
|
2752
|
+
onChange: ee
|
2735
2753
|
}
|
2736
2754
|
)
|
2737
2755
|
] }),
|
@@ -2746,7 +2764,7 @@ function di(e) {
|
|
2746
2764
|
min: h.min,
|
2747
2765
|
max: h.max,
|
2748
2766
|
step: 0.01,
|
2749
|
-
onChange:
|
2767
|
+
onChange: ee
|
2750
2768
|
}
|
2751
2769
|
)
|
2752
2770
|
] }),
|
@@ -2759,7 +2777,7 @@ function di(e) {
|
|
2759
2777
|
type: "number",
|
2760
2778
|
value: h.min,
|
2761
2779
|
step: 0.01,
|
2762
|
-
onChange:
|
2780
|
+
onChange: A
|
2763
2781
|
}
|
2764
2782
|
)
|
2765
2783
|
] }),
|
@@ -2772,12 +2790,12 @@ function di(e) {
|
|
2772
2790
|
type: "number",
|
2773
2791
|
value: h.max,
|
2774
2792
|
step: 0.01,
|
2775
|
-
onChange:
|
2793
|
+
onChange: $
|
2776
2794
|
}
|
2777
2795
|
)
|
2778
2796
|
] })
|
2779
2797
|
] }),
|
2780
|
-
/* @__PURE__ */ u.jsxs("div", { className: "input", ref: c, onMouseDown: S, onMouseUp:
|
2798
|
+
/* @__PURE__ */ u.jsxs("div", { className: "input", ref: c, onMouseDown: S, onMouseUp: P, children: [
|
2781
2799
|
/* @__PURE__ */ u.jsx("div", { className: "x" }),
|
2782
2800
|
/* @__PURE__ */ u.jsx("div", { className: "y" }),
|
2783
2801
|
/* @__PURE__ */ u.jsx("div", { className: "pt", ref: l })
|
@@ -2787,11 +2805,11 @@ function di(e) {
|
|
2787
2805
|
function ln(e) {
|
2788
2806
|
const n = e.value.isVector3 !== void 0, a = e.value.isEuler !== void 0, t = e.value.elements !== void 0, i = [];
|
2789
2807
|
if (n) {
|
2790
|
-
const c =
|
2808
|
+
const c = se(() => e.value, []), l = (d, h) => {
|
2791
2809
|
c[d] = h, e.onChange({ target: { value: c } });
|
2792
2810
|
};
|
2793
2811
|
["x", "y", "z"].forEach((d) => {
|
2794
|
-
const h =
|
2812
|
+
const h = Z(null);
|
2795
2813
|
i.push(
|
2796
2814
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
2797
2815
|
/* @__PURE__ */ u.jsx("label", { ref: h, children: d.toUpperCase() }),
|
@@ -2810,11 +2828,11 @@ function ln(e) {
|
|
2810
2828
|
);
|
2811
2829
|
});
|
2812
2830
|
} else if (a) {
|
2813
|
-
const c =
|
2831
|
+
const c = se(() => e.value, []), l = (d, h) => {
|
2814
2832
|
c[d] = h, e.onChange({ target: { value: c } });
|
2815
2833
|
};
|
2816
2834
|
["_x", "_y", "_z"].forEach((d) => {
|
2817
|
-
const h =
|
2835
|
+
const h = Z(null);
|
2818
2836
|
i.push(
|
2819
2837
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
2820
2838
|
/* @__PURE__ */ u.jsx("label", { ref: h, children: d.substring(1).toUpperCase() }),
|
@@ -2833,12 +2851,12 @@ function ln(e) {
|
|
2833
2851
|
);
|
2834
2852
|
});
|
2835
2853
|
} else if (t) {
|
2836
|
-
const c =
|
2854
|
+
const c = se(() => e.value, []), l = (r, d) => {
|
2837
2855
|
const h = Number(r);
|
2838
2856
|
c.elements[h] = d, e.onChange({ target: { value: c } });
|
2839
2857
|
};
|
2840
2858
|
for (let r = 0; r < 9; r++) {
|
2841
|
-
const d =
|
2859
|
+
const d = Z(null);
|
2842
2860
|
i.push(
|
2843
2861
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
2844
2862
|
/* @__PURE__ */ u.jsx("label", { ref: d, children: r + 1 }),
|
@@ -2862,11 +2880,11 @@ function ln(e) {
|
|
2862
2880
|
function hi(e) {
|
2863
2881
|
const n = e.value.x !== void 0, a = [];
|
2864
2882
|
if (n) {
|
2865
|
-
const t =
|
2883
|
+
const t = se(() => e.value, []), i = (l, r) => {
|
2866
2884
|
t[l] = r, e.onChange({ target: { value: t } });
|
2867
2885
|
};
|
2868
2886
|
["x", "y", "z", "w"].forEach((l) => {
|
2869
|
-
const r =
|
2887
|
+
const r = Z(null);
|
2870
2888
|
a.push(
|
2871
2889
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
2872
2890
|
/* @__PURE__ */ u.jsx("label", { ref: r, children: l.toUpperCase() }),
|
@@ -2885,12 +2903,12 @@ function hi(e) {
|
|
2885
2903
|
);
|
2886
2904
|
});
|
2887
2905
|
} else {
|
2888
|
-
const t =
|
2906
|
+
const t = se(() => e.value, []), i = (c, l) => {
|
2889
2907
|
const r = Number(c);
|
2890
2908
|
t.elements[r] = l, e.onChange({ target: { value: t } });
|
2891
2909
|
};
|
2892
2910
|
for (let c = 0; c < 16; c++) {
|
2893
|
-
const l =
|
2911
|
+
const l = Z(null);
|
2894
2912
|
a.push(
|
2895
2913
|
/* @__PURE__ */ u.jsxs("div", { children: [
|
2896
2914
|
/* @__PURE__ */ u.jsx("label", { ref: l, children: c + 1 }),
|
@@ -2914,7 +2932,7 @@ function hi(e) {
|
|
2914
2932
|
function Mt(e) {
|
2915
2933
|
let n = e.value;
|
2916
2934
|
n !== void 0 && n.isColor !== void 0 && (n = Da(e.value));
|
2917
|
-
const [a, t] =
|
2935
|
+
const [a, t] = K(n), i = Z(null), c = Z(null), l = (m) => {
|
2918
2936
|
let f = m.target.value;
|
2919
2937
|
e.type === "boolean" ? f = m.target.checked : e.type === "option" && (f = e.options[f].value), t(f), e.onChange !== void 0 && e.onChange(e.prop !== void 0 ? e.prop : e.title, f);
|
2920
2938
|
}, r = {};
|
@@ -3052,7 +3070,7 @@ function fi(e, n) {
|
|
3052
3070
|
const l = n.getScene(e.uuid);
|
3053
3071
|
if (l !== null) {
|
3054
3072
|
const r = l.getObjectByProperty("uuid", e.uuid);
|
3055
|
-
r !== void 0 && (
|
3073
|
+
r !== void 0 && (Q(r, i, c), r.updateProjectionMatrix());
|
3056
3074
|
}
|
3057
3075
|
}
|
3058
3076
|
});
|
@@ -3069,7 +3087,7 @@ function fi(e, n) {
|
|
3069
3087
|
const l = n.getScene(e.uuid);
|
3070
3088
|
if (l !== null) {
|
3071
3089
|
const r = l.getObjectByProperty("uuid", e.uuid);
|
3072
|
-
r !== void 0 && (
|
3090
|
+
r !== void 0 && (Q(r, i, c), r.updateProjectionMatrix());
|
3073
3091
|
}
|
3074
3092
|
}
|
3075
3093
|
});
|
@@ -3084,7 +3102,7 @@ function fi(e, n) {
|
|
3084
3102
|
function mi(e, n) {
|
3085
3103
|
const a = new sa();
|
3086
3104
|
a.elements = e.matrix;
|
3087
|
-
const t = new
|
3105
|
+
const t = new q(), i = new oa(), c = new q();
|
3088
3106
|
e.uuid.length > 0 && (t.setFromMatrixPosition(a), i.setFromRotationMatrix(a), c.setFromMatrixScale(a));
|
3089
3107
|
const l = (r, d) => {
|
3090
3108
|
const h = r === "rotation" ? { x: d._x, y: d._y, z: d._z } : d;
|
@@ -3092,7 +3110,7 @@ function mi(e, n) {
|
|
3092
3110
|
const m = n.getScene(e.uuid);
|
3093
3111
|
if (m !== null) {
|
3094
3112
|
const f = m.getObjectByProperty("uuid", e.uuid);
|
3095
|
-
f !== void 0 &&
|
3113
|
+
f !== void 0 && Q(f, r, h);
|
3096
3114
|
}
|
3097
3115
|
};
|
3098
3116
|
return /* @__PURE__ */ u.jsx(
|
@@ -3164,7 +3182,7 @@ function pi(e, n) {
|
|
3164
3182
|
const d = n.getScene(e.uuid);
|
3165
3183
|
if (d !== null) {
|
3166
3184
|
const h = d.getObjectByProperty("uuid", e.uuid);
|
3167
|
-
h !== void 0 &&
|
3185
|
+
h !== void 0 && Q(h, c, r);
|
3168
3186
|
}
|
3169
3187
|
}
|
3170
3188
|
}) : a.push({
|
@@ -3178,7 +3196,7 @@ function pi(e, n) {
|
|
3178
3196
|
const r = n.getScene(e.uuid);
|
3179
3197
|
if (r !== null) {
|
3180
3198
|
const d = r.getObjectByProperty("uuid", e.uuid);
|
3181
|
-
d !== void 0 &&
|
3199
|
+
d !== void 0 && Q(d, c, l);
|
3182
3200
|
}
|
3183
3201
|
}
|
3184
3202
|
}));
|
@@ -3273,22 +3291,22 @@ const zn = {
|
|
3273
3291
|
lightInfo: void 0,
|
3274
3292
|
children: []
|
3275
3293
|
};
|
3276
|
-
let
|
3294
|
+
let fe = { ...zn };
|
3277
3295
|
function vi(e) {
|
3278
|
-
const [n, a] =
|
3296
|
+
const [n, a] = K(-1);
|
3279
3297
|
_e(() => {
|
3280
3298
|
function l(d) {
|
3281
|
-
|
3299
|
+
fe = { ...d.value }, a(Date.now());
|
3282
3300
|
}
|
3283
3301
|
function r() {
|
3284
|
-
|
3302
|
+
fe = { ...zn }, a(Date.now());
|
3285
3303
|
}
|
3286
3304
|
return R.addEventListener(k.SET_SCENE, r), R.addEventListener(k.SET_OBJECT, l), () => {
|
3287
3305
|
R.removeEventListener(k.SET_SCENE, r), R.removeEventListener(k.SET_OBJECT, l);
|
3288
3306
|
};
|
3289
3307
|
}, []);
|
3290
|
-
const t =
|
3291
|
-
return /* @__PURE__ */ u.jsx(Wt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: e.class, children:
|
3308
|
+
const t = fe.type.toLowerCase(), i = fe.animations.length > 0 || fe.mixer !== void 0, c = t.search("mesh") > -1 || t.search("line") > -1 || t.search("points") > -1;
|
3309
|
+
return /* @__PURE__ */ u.jsx(Wt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: e.class, children: fe.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
3292
3310
|
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
3293
3311
|
/* @__PURE__ */ u.jsx(
|
3294
3312
|
Mt,
|
@@ -3296,7 +3314,7 @@ function vi(e) {
|
|
3296
3314
|
type: "string",
|
3297
3315
|
title: "Name",
|
3298
3316
|
prop: "name",
|
3299
|
-
value:
|
3317
|
+
value: fe.name,
|
3300
3318
|
disabled: !0
|
3301
3319
|
}
|
3302
3320
|
),
|
@@ -3306,7 +3324,7 @@ function vi(e) {
|
|
3306
3324
|
type: "string",
|
3307
3325
|
title: "Type",
|
3308
3326
|
prop: "type",
|
3309
|
-
value:
|
3327
|
+
value: fe.type,
|
3310
3328
|
disabled: !0
|
3311
3329
|
}
|
3312
3330
|
),
|
@@ -3316,22 +3334,22 @@ function vi(e) {
|
|
3316
3334
|
type: "string",
|
3317
3335
|
title: "UUID",
|
3318
3336
|
prop: "uuid",
|
3319
|
-
value:
|
3337
|
+
value: fe.uuid,
|
3320
3338
|
disabled: !0
|
3321
3339
|
}
|
3322
3340
|
)
|
3323
3341
|
] }),
|
3324
3342
|
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
3325
|
-
mi(
|
3326
|
-
i ? gi(
|
3327
|
-
t.search("camera") > -1 ? fi(
|
3328
|
-
t.search("light") > -1 ? pi(
|
3329
|
-
c ? li(
|
3343
|
+
mi(fe, e.three),
|
3344
|
+
i ? gi(fe, e.three) : null,
|
3345
|
+
t.search("camera") > -1 ? fi(fe, e.three) : null,
|
3346
|
+
t.search("light") > -1 ? pi(fe, e.three) : null,
|
3347
|
+
c ? li(fe, e.three) : null
|
3330
3348
|
] })
|
3331
3349
|
] }) }, n) }, "Inspector");
|
3332
3350
|
}
|
3333
3351
|
function Fi(e) {
|
3334
|
-
const [n] =
|
3352
|
+
const [n] = K([]), [a, t] = K(0), i = (r) => {
|
3335
3353
|
n.push(r.value), t(Date.now());
|
3336
3354
|
}, c = (r) => {
|
3337
3355
|
const d = r.value;
|
@@ -3367,22 +3385,40 @@ function Ui(e) {
|
|
3367
3385
|
m !== void 0 && e.three.setObject(m);
|
3368
3386
|
}, t = (r, d, h) => {
|
3369
3387
|
const f = n(r)?.getObjectByProperty("uuid", r);
|
3370
|
-
f !== void 0 &&
|
3388
|
+
f !== void 0 && Q(f, d, h);
|
3371
3389
|
}, i = (r) => {
|
3372
3390
|
const d = r.value, { key: h, value: m, uuid: f } = d;
|
3373
3391
|
t(f, h, m);
|
3374
3392
|
}, c = (r) => {
|
3375
|
-
const d = r.value;
|
3376
|
-
Bn(d.value).then((
|
3377
|
-
|
3393
|
+
const d = r.value, m = n(d.uuid)?.getObjectByProperty("uuid", d.uuid);
|
3394
|
+
m !== void 0 && Bn(d.value).then((f) => {
|
3395
|
+
const g = d.key.split(".");
|
3396
|
+
switch (g.length) {
|
3397
|
+
case 1:
|
3398
|
+
m[g[0]] = f;
|
3399
|
+
break;
|
3400
|
+
case 2:
|
3401
|
+
m[g[0]][g[1]] = f;
|
3402
|
+
break;
|
3403
|
+
case 3:
|
3404
|
+
m[g[0]][g[1]][g[2]] = f;
|
3405
|
+
break;
|
3406
|
+
case 4:
|
3407
|
+
m[g[0]][g[1]][g[2]][g[3]] = f;
|
3408
|
+
break;
|
3409
|
+
case 5:
|
3410
|
+
m[g[0]][g[1]][g[2]][g[3]][g[4]] = f;
|
3411
|
+
break;
|
3412
|
+
}
|
3413
|
+
m.material.needsUpdate = !0;
|
3378
3414
|
});
|
3379
3415
|
}, l = (r) => {
|
3380
3416
|
const { key: d, uuid: h, value: m, subitem: f } = r.value, S = n(h)?.getObjectByProperty("uuid", h);
|
3381
3417
|
if (S !== void 0)
|
3382
3418
|
try {
|
3383
3419
|
f !== void 0 ? Na(S, f)[d](m) : S[d](m);
|
3384
|
-
} catch (
|
3385
|
-
console.log("Error requesting method:"), console.log(
|
3420
|
+
} catch (P) {
|
3421
|
+
console.log("Error requesting method:"), console.log(P), console.log(d), console.log(m);
|
3386
3422
|
}
|
3387
3423
|
};
|
3388
3424
|
return R.addEventListener(k.GET_OBJECT, a), R.addEventListener(k.UPDATE_OBJECT, i), R.addEventListener(k.CREATE_TEXTURE, c), R.addEventListener(k.REQUEST_METHOD, l), () => {
|
@@ -3416,7 +3452,7 @@ class bi extends ca {
|
|
3416
3452
|
const hn = { type: "change" }, jt = { type: "start" }, fn = { type: "end" }, xt = new ua(), mn = new da(), yi = Math.cos(70 * ha.DEG2RAD);
|
3417
3453
|
class Ei extends pn {
|
3418
3454
|
constructor(n, a) {
|
3419
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
3455
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new q(), this.cursor = new q(), this.minDistance = 0, this.maxDistance = 1 / 0, this.minZoom = 0, this.maxZoom = 1 / 0, this.minTargetRadius = 0, this.maxTargetRadius = 1 / 0, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -1 / 0, this.maxAzimuthAngle = 1 / 0, this.enableDamping = !1, this.dampingFactor = 0.05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = { LEFT: "ArrowLeft", UP: "ArrowUp", RIGHT: "ArrowRight", BOTTOM: "ArrowDown" }, this.mouseButtons = { LEFT: nt.ROTATE, MIDDLE: nt.DOLLY, RIGHT: nt.PAN }, this.touches = { ONE: at.ROTATE, TWO: at.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
3420
3456
|
return r.phi;
|
3421
3457
|
}, this.getAzimuthalAngle = function() {
|
3422
3458
|
return r.theta;
|
@@ -3431,12 +3467,12 @@ class Ei extends pn {
|
|
3431
3467
|
}, this.reset = function() {
|
3432
3468
|
t.target.copy(t.target0), t.object.position.copy(t.position0), t.object.zoom = t.zoom0, t.object.updateProjectionMatrix(), t.dispatchEvent(hn), t.update(), c = i.NONE;
|
3433
3469
|
}, this.update = function() {
|
3434
|
-
const o = new
|
3470
|
+
const o = new q(), E = new Xt().setFromUnitVectors(n.up, new q(0, 1, 0)), _ = E.clone().invert(), N = new q(), ae = new Xt(), ye = new q(), de = 2 * Math.PI;
|
3435
3471
|
return function(bt = null) {
|
3436
3472
|
const yt = t.object.position;
|
3437
3473
|
o.copy(yt).sub(t.target), o.applyQuaternion(E), r.setFromVector3(o), t.autoRotate && c === i.NONE && ve(Re(bt)), t.enableDamping ? (r.theta += d.theta * t.dampingFactor, r.phi += d.phi * t.dampingFactor) : (r.theta += d.theta, r.phi += d.phi);
|
3438
3474
|
let Ee = t.minAzimuthAngle, xe = t.maxAzimuthAngle;
|
3439
|
-
isFinite(Ee) && isFinite(xe) && (Ee < -Math.PI ? Ee +=
|
3475
|
+
isFinite(Ee) && isFinite(xe) && (Ee < -Math.PI ? Ee += de : Ee > Math.PI && (Ee -= de), xe < -Math.PI ? xe += de : xe > Math.PI && (xe -= de), Ee <= xe ? r.theta = Math.max(Ee, Math.min(xe, r.theta)) : r.theta = r.theta > (Ee + xe) / 2 ? Math.max(Ee, r.theta) : Math.min(xe, r.theta)), r.phi = Math.max(t.minPolarAngle, Math.min(t.maxPolarAngle, r.phi)), r.makeSafe(), t.enableDamping === !0 ? t.target.addScaledVector(m, t.dampingFactor) : t.target.add(m), t.target.sub(t.cursor), t.target.clampLength(t.minTargetRadius, t.maxTargetRadius), t.target.add(t.cursor);
|
3440
3476
|
let Ye = !1;
|
3441
3477
|
if (t.zoomToCursor && Ce || t.object.isOrthographicCamera)
|
3442
3478
|
r.radius = Ae(r.radius);
|
@@ -3450,13 +3486,13 @@ class Ei extends pn {
|
|
3450
3486
|
const ze = o.length();
|
3451
3487
|
Oe = Ae(ze * h);
|
3452
3488
|
const et = ze - Oe;
|
3453
|
-
t.object.position.addScaledVector(
|
3489
|
+
t.object.position.addScaledVector(X, et), t.object.updateMatrixWorld(), Ye = !!et;
|
3454
3490
|
} else if (t.object.isOrthographicCamera) {
|
3455
|
-
const ze = new
|
3491
|
+
const ze = new q(ie.x, ie.y, 0);
|
3456
3492
|
ze.unproject(t.object);
|
3457
3493
|
const et = t.object.zoom;
|
3458
3494
|
t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / h)), t.object.updateProjectionMatrix(), Ye = et !== t.object.zoom;
|
3459
|
-
const Et = new
|
3495
|
+
const Et = new q(ie.x, ie.y, 0);
|
3460
3496
|
Et.unproject(t.object), t.object.position.sub(Et).add(ze), t.object.updateMatrixWorld(), Oe = o.length();
|
3461
3497
|
} else
|
3462
3498
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), t.zoomToCursor = !1;
|
@@ -3465,10 +3501,10 @@ class Ei extends pn {
|
|
3465
3501
|
const Oe = t.object.zoom;
|
3466
3502
|
t.object.zoom = Math.max(t.minZoom, Math.min(t.maxZoom, t.object.zoom / h)), Oe !== t.object.zoom && (t.object.updateProjectionMatrix(), Ye = !0);
|
3467
3503
|
}
|
3468
|
-
return h = 1, Ce = !1, Ye ||
|
3504
|
+
return h = 1, Ce = !1, Ye || N.distanceToSquared(t.object.position) > l || 8 * (1 - ae.dot(t.object.quaternion)) > l || ye.distanceToSquared(t.target) > l ? (t.dispatchEvent(hn), N.copy(t.object.position), ae.copy(t.object.quaternion), ye.copy(t.target), !0) : !1;
|
3469
3505
|
};
|
3470
3506
|
}(), this.dispose = function() {
|
3471
|
-
t.domElement.removeEventListener("contextmenu", Qe), t.domElement.removeEventListener("pointerdown", T), t.domElement.removeEventListener("pointercancel",
|
3507
|
+
t.domElement.removeEventListener("contextmenu", Qe), t.domElement.removeEventListener("pointerdown", T), t.domElement.removeEventListener("pointercancel", H), t.domElement.removeEventListener("wheel", mt), t.domElement.removeEventListener("pointermove", U), t.domElement.removeEventListener("pointerup", H), t.domElement.getRootNode().removeEventListener("keydown", st, { capture: !0 }), t._domElementKeyEvents !== null && (t._domElementKeyEvents.removeEventListener("keydown", ot), t._domElementKeyEvents = null);
|
3472
3508
|
};
|
3473
3509
|
const t = this, i = {
|
3474
3510
|
NONE: -1,
|
@@ -3483,10 +3519,10 @@ class Ei extends pn {
|
|
3483
3519
|
let c = i.NONE;
|
3484
3520
|
const l = 1e-6, r = new Jt(), d = new Jt();
|
3485
3521
|
let h = 1;
|
3486
|
-
const m = new
|
3522
|
+
const m = new q(), f = new me(), g = new me(), S = new me(), P = new me(), V = new me(), ee = new me(), A = new me(), $ = new me(), L = new me(), X = new q(), ie = new me();
|
3487
3523
|
let Ce = !1;
|
3488
|
-
const
|
3489
|
-
let
|
3524
|
+
const W = [], pe = {};
|
3525
|
+
let ce = !1;
|
3490
3526
|
function Re(o) {
|
3491
3527
|
return o !== null ? 2 * Math.PI / 60 * t.autoRotateSpeed * o : 2 * Math.PI / 60 / 60 * t.autoRotateSpeed;
|
3492
3528
|
}
|
@@ -3497,30 +3533,30 @@ class Ei extends pn {
|
|
3497
3533
|
function ve(o) {
|
3498
3534
|
d.theta -= o;
|
3499
3535
|
}
|
3500
|
-
function
|
3536
|
+
function B(o) {
|
3501
3537
|
d.phi -= o;
|
3502
3538
|
}
|
3503
3539
|
const be = function() {
|
3504
|
-
const o = new
|
3505
|
-
return function(_,
|
3506
|
-
o.setFromMatrixColumn(
|
3540
|
+
const o = new q();
|
3541
|
+
return function(_, N) {
|
3542
|
+
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-_), m.add(o);
|
3507
3543
|
};
|
3508
3544
|
}(), O = function() {
|
3509
|
-
const o = new
|
3510
|
-
return function(_,
|
3511
|
-
t.screenSpacePanning === !0 ? o.setFromMatrixColumn(
|
3545
|
+
const o = new q();
|
3546
|
+
return function(_, N) {
|
3547
|
+
t.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(t.object.up, o)), o.multiplyScalar(_), m.add(o);
|
3512
3548
|
};
|
3513
3549
|
}(), we = function() {
|
3514
|
-
const o = new
|
3515
|
-
return function(_,
|
3516
|
-
const
|
3550
|
+
const o = new q();
|
3551
|
+
return function(_, N) {
|
3552
|
+
const ae = t.domElement;
|
3517
3553
|
if (t.object.isPerspectiveCamera) {
|
3518
3554
|
const ye = t.object.position;
|
3519
3555
|
o.copy(ye).sub(t.target);
|
3520
|
-
let
|
3521
|
-
|
3556
|
+
let de = o.length();
|
3557
|
+
de *= Math.tan(t.object.fov / 2 * Math.PI / 180), be(2 * _ * de / ae.clientHeight, t.object.matrix), O(2 * N * de / ae.clientHeight, t.object.matrix);
|
3522
3558
|
} else
|
3523
|
-
t.object.isOrthographicCamera ? (be(_ * (t.object.right - t.object.left) / t.object.zoom /
|
3559
|
+
t.object.isOrthographicCamera ? (be(_ * (t.object.right - t.object.left) / t.object.zoom / ae.clientWidth, t.object.matrix), O(N * (t.object.top - t.object.bottom) / t.object.zoom / ae.clientHeight, t.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), t.enablePan = !1);
|
3524
3560
|
};
|
3525
3561
|
}();
|
3526
3562
|
function De(o) {
|
@@ -3533,8 +3569,8 @@ class Ei extends pn {
|
|
3533
3569
|
if (!t.zoomToCursor)
|
3534
3570
|
return;
|
3535
3571
|
Ce = !0;
|
3536
|
-
const _ = t.domElement.getBoundingClientRect(),
|
3537
|
-
|
3572
|
+
const _ = t.domElement.getBoundingClientRect(), N = o - _.left, ae = E - _.top, ye = _.width, de = _.height;
|
3573
|
+
ie.x = N / ye * 2 - 1, ie.y = -(ae / de) * 2 + 1, X.set(ie.x, ie.y, 1).unproject(t.object).sub(t.object.position).normalize();
|
3538
3574
|
}
|
3539
3575
|
function Ae(o) {
|
3540
3576
|
return Math.max(t.minDistance, Math.min(t.maxDistance, o));
|
@@ -3543,33 +3579,33 @@ class Ei extends pn {
|
|
3543
3579
|
f.set(o.clientX, o.clientY);
|
3544
3580
|
}
|
3545
3581
|
function Be(o) {
|
3546
|
-
Pe(o.clientX, o.clientX),
|
3582
|
+
Pe(o.clientX, o.clientX), A.set(o.clientX, o.clientY);
|
3547
3583
|
}
|
3548
3584
|
function Fe(o) {
|
3549
|
-
|
3585
|
+
P.set(o.clientX, o.clientY);
|
3550
3586
|
}
|
3551
|
-
function
|
3552
|
-
|
3587
|
+
function re(o) {
|
3588
|
+
g.set(o.clientX, o.clientY), S.subVectors(g, f).multiplyScalar(t.rotateSpeed);
|
3553
3589
|
const E = t.domElement;
|
3554
|
-
ve(2 * Math.PI * S.x / E.clientHeight),
|
3590
|
+
ve(2 * Math.PI * S.x / E.clientHeight), B(2 * Math.PI * S.y / E.clientHeight), f.copy(g), t.update();
|
3555
3591
|
}
|
3556
3592
|
function Me(o) {
|
3557
|
-
|
3593
|
+
$.set(o.clientX, o.clientY), L.subVectors($, A), L.y > 0 ? De(ke(L.y)) : L.y < 0 && Ie(ke(L.y)), A.copy($), t.update();
|
3558
3594
|
}
|
3559
3595
|
function He(o) {
|
3560
|
-
|
3596
|
+
V.set(o.clientX, o.clientY), ee.subVectors(V, P).multiplyScalar(t.panSpeed), we(ee.x, ee.y), P.copy(V), t.update();
|
3561
3597
|
}
|
3562
3598
|
function Ve(o) {
|
3563
3599
|
Pe(o.clientX, o.clientY), o.deltaY < 0 ? Ie(ke(o.deltaY)) : o.deltaY > 0 && De(ke(o.deltaY)), t.update();
|
3564
3600
|
}
|
3565
|
-
function
|
3601
|
+
function ue(o) {
|
3566
3602
|
let E = !1;
|
3567
3603
|
switch (o.code) {
|
3568
3604
|
case t.keys.UP:
|
3569
|
-
o.ctrlKey || o.metaKey || o.shiftKey ?
|
3605
|
+
o.ctrlKey || o.metaKey || o.shiftKey ? B(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, t.keyPanSpeed), E = !0;
|
3570
3606
|
break;
|
3571
3607
|
case t.keys.BOTTOM:
|
3572
|
-
o.ctrlKey || o.metaKey || o.shiftKey ?
|
3608
|
+
o.ctrlKey || o.metaKey || o.shiftKey ? B(-2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(0, -t.keyPanSpeed), E = !0;
|
3573
3609
|
break;
|
3574
3610
|
case t.keys.LEFT:
|
3575
3611
|
o.ctrlKey || o.metaKey || o.shiftKey ? ve(2 * Math.PI * t.rotateSpeed / t.domElement.clientHeight) : we(t.keyPanSpeed, 0), E = !0;
|
@@ -3580,77 +3616,77 @@ class Ei extends pn {
|
|
3580
3616
|
}
|
3581
3617
|
E && (o.preventDefault(), t.update());
|
3582
3618
|
}
|
3583
|
-
function
|
3584
|
-
if (
|
3619
|
+
function v(o) {
|
3620
|
+
if (W.length === 1)
|
3585
3621
|
f.set(o.pageX, o.pageY);
|
3586
3622
|
else {
|
3587
|
-
const E = $e(o), _ = 0.5 * (o.pageX + E.x),
|
3588
|
-
f.set(_,
|
3623
|
+
const E = $e(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
|
3624
|
+
f.set(_, N);
|
3589
3625
|
}
|
3590
3626
|
}
|
3591
|
-
function
|
3592
|
-
if (
|
3593
|
-
|
3627
|
+
function b(o) {
|
3628
|
+
if (W.length === 1)
|
3629
|
+
P.set(o.pageX, o.pageY);
|
3594
3630
|
else {
|
3595
|
-
const E = $e(o), _ = 0.5 * (o.pageX + E.x),
|
3596
|
-
|
3631
|
+
const E = $e(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
|
3632
|
+
P.set(_, N);
|
3597
3633
|
}
|
3598
3634
|
}
|
3599
3635
|
function M(o) {
|
3600
|
-
const E = $e(o), _ = o.pageX - E.x,
|
3601
|
-
|
3636
|
+
const E = $e(o), _ = o.pageX - E.x, N = o.pageY - E.y, ae = Math.sqrt(_ * _ + N * N);
|
3637
|
+
A.set(0, ae);
|
3602
3638
|
}
|
3603
|
-
function
|
3604
|
-
t.enableZoom && M(o), t.enablePan &&
|
3639
|
+
function I(o) {
|
3640
|
+
t.enableZoom && M(o), t.enablePan && b(o);
|
3605
3641
|
}
|
3606
3642
|
function ge(o) {
|
3607
|
-
t.enableZoom && M(o), t.enableRotate &&
|
3643
|
+
t.enableZoom && M(o), t.enableRotate && v(o);
|
3608
3644
|
}
|
3609
|
-
function
|
3610
|
-
if (
|
3611
|
-
|
3645
|
+
function le(o) {
|
3646
|
+
if (W.length == 1)
|
3647
|
+
g.set(o.pageX, o.pageY);
|
3612
3648
|
else {
|
3613
|
-
const _ = $e(o),
|
3614
|
-
|
3649
|
+
const _ = $e(o), N = 0.5 * (o.pageX + _.x), ae = 0.5 * (o.pageY + _.y);
|
3650
|
+
g.set(N, ae);
|
3615
3651
|
}
|
3616
|
-
S.subVectors(
|
3652
|
+
S.subVectors(g, f).multiplyScalar(t.rotateSpeed);
|
3617
3653
|
const E = t.domElement;
|
3618
|
-
ve(2 * Math.PI * S.x / E.clientHeight),
|
3654
|
+
ve(2 * Math.PI * S.x / E.clientHeight), B(2 * Math.PI * S.y / E.clientHeight), f.copy(g);
|
3619
3655
|
}
|
3620
3656
|
function C(o) {
|
3621
|
-
if (
|
3622
|
-
|
3657
|
+
if (W.length === 1)
|
3658
|
+
V.set(o.pageX, o.pageY);
|
3623
3659
|
else {
|
3624
|
-
const E = $e(o), _ = 0.5 * (o.pageX + E.x),
|
3625
|
-
|
3660
|
+
const E = $e(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
|
3661
|
+
V.set(_, N);
|
3626
3662
|
}
|
3627
|
-
|
3663
|
+
ee.subVectors(V, P).multiplyScalar(t.panSpeed), we(ee.x, ee.y), P.copy(V);
|
3628
3664
|
}
|
3629
3665
|
function x(o) {
|
3630
|
-
const E = $e(o), _ = o.pageX - E.x,
|
3631
|
-
|
3632
|
-
const ye = (o.pageX + E.x) * 0.5,
|
3633
|
-
Pe(ye,
|
3666
|
+
const E = $e(o), _ = o.pageX - E.x, N = o.pageY - E.y, ae = Math.sqrt(_ * _ + N * N);
|
3667
|
+
$.set(0, ae), L.set(0, Math.pow($.y / A.y, t.zoomSpeed)), De(L.y), A.copy($);
|
3668
|
+
const ye = (o.pageX + E.x) * 0.5, de = (o.pageY + E.y) * 0.5;
|
3669
|
+
Pe(ye, de);
|
3634
3670
|
}
|
3635
|
-
function
|
3671
|
+
function z(o) {
|
3636
3672
|
t.enableZoom && x(o), t.enablePan && C(o);
|
3637
3673
|
}
|
3638
|
-
function
|
3639
|
-
t.enableZoom && x(o), t.enableRotate &&
|
3674
|
+
function te(o) {
|
3675
|
+
t.enableZoom && x(o), t.enableRotate && le(o);
|
3640
3676
|
}
|
3641
3677
|
function T(o) {
|
3642
|
-
t.enabled !== !1 && (
|
3678
|
+
t.enabled !== !1 && (W.length === 0 && (t.domElement.setPointerCapture(o.pointerId), t.domElement.addEventListener("pointermove", U), t.domElement.addEventListener("pointerup", H)), !Pt(o) && (kt(o), o.pointerType === "touch" ? ct(o) : Ne(o)));
|
3643
3679
|
}
|
3644
|
-
function
|
3680
|
+
function U(o) {
|
3645
3681
|
t.enabled !== !1 && (o.pointerType === "touch" ? gt(o) : Je(o));
|
3646
3682
|
}
|
3647
|
-
function
|
3648
|
-
switch (Dt(o),
|
3683
|
+
function H(o) {
|
3684
|
+
switch (Dt(o), W.length) {
|
3649
3685
|
case 0:
|
3650
|
-
t.domElement.releasePointerCapture(o.pointerId), t.domElement.removeEventListener("pointermove",
|
3686
|
+
t.domElement.releasePointerCapture(o.pointerId), t.domElement.removeEventListener("pointermove", U), t.domElement.removeEventListener("pointerup", H), t.dispatchEvent(fn), c = i.NONE;
|
3651
3687
|
break;
|
3652
3688
|
case 1:
|
3653
|
-
const E =
|
3689
|
+
const E = W[0], _ = pe[E];
|
3654
3690
|
ct({ pointerId: E, pageX: _.x, pageY: _.y });
|
3655
3691
|
break;
|
3656
3692
|
}
|
@@ -3708,7 +3744,7 @@ class Ei extends pn {
|
|
3708
3744
|
case i.ROTATE:
|
3709
3745
|
if (t.enableRotate === !1)
|
3710
3746
|
return;
|
3711
|
-
|
3747
|
+
re(o);
|
3712
3748
|
break;
|
3713
3749
|
case i.DOLLY:
|
3714
3750
|
if (t.enableZoom === !1)
|
@@ -3739,30 +3775,30 @@ class Ei extends pn {
|
|
3739
3775
|
_.deltaY *= 100;
|
3740
3776
|
break;
|
3741
3777
|
}
|
3742
|
-
return o.ctrlKey && !
|
3778
|
+
return o.ctrlKey && !ce && (_.deltaY *= 10), _;
|
3743
3779
|
}
|
3744
3780
|
function st(o) {
|
3745
|
-
o.key === "Control" && (
|
3781
|
+
o.key === "Control" && (ce = !0, t.domElement.getRootNode().addEventListener("keyup", Ue, { passive: !0, capture: !0 }));
|
3746
3782
|
}
|
3747
3783
|
function Ue(o) {
|
3748
|
-
o.key === "Control" && (
|
3784
|
+
o.key === "Control" && (ce = !1, t.domElement.getRootNode().removeEventListener("keyup", Ue, { passive: !0, capture: !0 }));
|
3749
3785
|
}
|
3750
3786
|
function ot(o) {
|
3751
|
-
t.enabled === !1 || t.enablePan === !1 ||
|
3787
|
+
t.enabled === !1 || t.enablePan === !1 || ue(o);
|
3752
3788
|
}
|
3753
3789
|
function ct(o) {
|
3754
|
-
switch (vt(o),
|
3790
|
+
switch (vt(o), W.length) {
|
3755
3791
|
case 1:
|
3756
3792
|
switch (t.touches.ONE) {
|
3757
3793
|
case at.ROTATE:
|
3758
3794
|
if (t.enableRotate === !1)
|
3759
3795
|
return;
|
3760
|
-
|
3796
|
+
v(o), c = i.TOUCH_ROTATE;
|
3761
3797
|
break;
|
3762
3798
|
case at.PAN:
|
3763
3799
|
if (t.enablePan === !1)
|
3764
3800
|
return;
|
3765
|
-
|
3801
|
+
b(o), c = i.TOUCH_PAN;
|
3766
3802
|
break;
|
3767
3803
|
default:
|
3768
3804
|
c = i.NONE;
|
@@ -3773,7 +3809,7 @@ class Ei extends pn {
|
|
3773
3809
|
case at.DOLLY_PAN:
|
3774
3810
|
if (t.enableZoom === !1 && t.enablePan === !1)
|
3775
3811
|
return;
|
3776
|
-
|
3812
|
+
I(o), c = i.TOUCH_DOLLY_PAN;
|
3777
3813
|
break;
|
3778
3814
|
case at.DOLLY_ROTATE:
|
3779
3815
|
if (t.enableZoom === !1 && t.enableRotate === !1)
|
@@ -3794,7 +3830,7 @@ class Ei extends pn {
|
|
3794
3830
|
case i.TOUCH_ROTATE:
|
3795
3831
|
if (t.enableRotate === !1)
|
3796
3832
|
return;
|
3797
|
-
|
3833
|
+
le(o), t.update();
|
3798
3834
|
break;
|
3799
3835
|
case i.TOUCH_PAN:
|
3800
3836
|
if (t.enablePan === !1)
|
@@ -3804,12 +3840,12 @@ class Ei extends pn {
|
|
3804
3840
|
case i.TOUCH_DOLLY_PAN:
|
3805
3841
|
if (t.enableZoom === !1 && t.enablePan === !1)
|
3806
3842
|
return;
|
3807
|
-
|
3843
|
+
z(o), t.update();
|
3808
3844
|
break;
|
3809
3845
|
case i.TOUCH_DOLLY_ROTATE:
|
3810
3846
|
if (t.enableZoom === !1 && t.enableRotate === !1)
|
3811
3847
|
return;
|
3812
|
-
|
3848
|
+
te(o), t.update();
|
3813
3849
|
break;
|
3814
3850
|
default:
|
3815
3851
|
c = i.NONE;
|
@@ -3819,38 +3855,38 @@ class Ei extends pn {
|
|
3819
3855
|
t.enabled !== !1 && o.preventDefault();
|
3820
3856
|
}
|
3821
3857
|
function kt(o) {
|
3822
|
-
|
3858
|
+
W.push(o.pointerId);
|
3823
3859
|
}
|
3824
3860
|
function Dt(o) {
|
3825
3861
|
delete pe[o.pointerId];
|
3826
|
-
for (let E = 0; E <
|
3827
|
-
if (
|
3828
|
-
|
3862
|
+
for (let E = 0; E < W.length; E++)
|
3863
|
+
if (W[E] == o.pointerId) {
|
3864
|
+
W.splice(E, 1);
|
3829
3865
|
return;
|
3830
3866
|
}
|
3831
3867
|
}
|
3832
3868
|
function Pt(o) {
|
3833
|
-
for (let E = 0; E <
|
3834
|
-
if (
|
3869
|
+
for (let E = 0; E < W.length; E++)
|
3870
|
+
if (W[E] == o.pointerId)
|
3835
3871
|
return !0;
|
3836
3872
|
return !1;
|
3837
3873
|
}
|
3838
3874
|
function vt(o) {
|
3839
3875
|
let E = pe[o.pointerId];
|
3840
|
-
E === void 0 && (E = new
|
3876
|
+
E === void 0 && (E = new me(), pe[o.pointerId] = E), E.set(o.pageX, o.pageY);
|
3841
3877
|
}
|
3842
3878
|
function $e(o) {
|
3843
|
-
const E = o.pointerId ===
|
3879
|
+
const E = o.pointerId === W[0] ? W[1] : W[0];
|
3844
3880
|
return pe[E];
|
3845
3881
|
}
|
3846
|
-
t.domElement.addEventListener("contextmenu", Qe), t.domElement.addEventListener("pointerdown", T), t.domElement.addEventListener("pointercancel",
|
3882
|
+
t.domElement.addEventListener("contextmenu", Qe), t.domElement.addEventListener("pointerdown", T), t.domElement.addEventListener("pointercancel", H), t.domElement.addEventListener("wheel", mt, { passive: !1 }), t.domElement.getRootNode().addEventListener("keydown", st, { passive: !0, capture: !0 }), this.update();
|
3847
3883
|
}
|
3848
3884
|
}
|
3849
3885
|
function rt(e, n, a, t, i) {
|
3850
3886
|
return t + (e - n) * (i - t) / (a - n);
|
3851
3887
|
}
|
3852
3888
|
const Ot = (e) => {
|
3853
|
-
const [n, a] =
|
3889
|
+
const [n, a] = K(e.options[e.index]), t = () => {
|
3854
3890
|
e.onToggle(!e.open);
|
3855
3891
|
}, i = (c) => {
|
3856
3892
|
c !== n && (e.onSelect(c), a(c)), e.onToggle(!1);
|
@@ -3860,7 +3896,7 @@ const Ot = (e) => {
|
|
3860
3896
|
e.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: e.options.map((c) => /* @__PURE__ */ u.jsx("li", { onClick: () => i(c), children: c }, c)) })
|
3861
3897
|
] });
|
3862
3898
|
}, qe = _a(function(n, a) {
|
3863
|
-
const [t, i] =
|
3899
|
+
const [t, i] = K(!1), c = n.options.indexOf(n.camera.name);
|
3864
3900
|
return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
|
3865
3901
|
/* @__PURE__ */ u.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
3866
3902
|
t && i(!1);
|
@@ -4053,18 +4089,18 @@ class Mi extends jn {
|
|
4053
4089
|
});
|
4054
4090
|
}
|
4055
4091
|
}
|
4056
|
-
let St = "Renderer", Te, Ct = !1, Nt = !1,
|
4092
|
+
let St = "Renderer", Te, Ct = !1, Nt = !1, Y = null, oe = null, Ge = null, We = null;
|
4057
4093
|
function $i(e) {
|
4058
|
-
const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", c = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", l = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", r =
|
4094
|
+
const n = e.three.app.appID, a = localStorage.getItem(`${n}_mode`), t = localStorage.getItem(`${n}_tlCam`) !== null ? localStorage.getItem(`${n}_tlCam`) : "Debug", i = localStorage.getItem(`${n}_trCam`) !== null ? localStorage.getItem(`${n}_trCam`) : "Orthographic", c = localStorage.getItem(`${n}_blCam`) !== null ? localStorage.getItem(`${n}_blCam`) : "Front", l = localStorage.getItem(`${n}_brCam`) !== null ? localStorage.getItem(`${n}_brCam`) : "Top", r = se(() => /* @__PURE__ */ new Map(), []), d = se(() => /* @__PURE__ */ new Map(), []), h = se(() => /* @__PURE__ */ new Map(), []), m = se(() => /* @__PURE__ */ new Map(), []), f = se(() => new pa(), []), g = se(() => new ga(), []), S = se(() => new Si(), []), P = se(() => new Qt(500), []), V = se(() => new Qt(100), []), ee = se(() => new va(), []), A = se(() => new ba(), []), $ = se(() => new Mi(), []), L = se(() => new In({
|
4059
4095
|
opacity: 0.33,
|
4060
4096
|
transparent: !0,
|
4061
4097
|
wireframe: !0
|
4062
4098
|
}), []);
|
4063
|
-
function
|
4099
|
+
function X(v, b) {
|
4064
4100
|
const M = new en(-100, 100, 100, -100, 50, 5e3);
|
4065
|
-
return M.name =
|
4101
|
+
return M.name = v, M.position.copy(b), M.lookAt(0, 0, 0), r.set(v, M), M;
|
4066
4102
|
}
|
4067
|
-
const
|
4103
|
+
const ie = [
|
4068
4104
|
"Renderer",
|
4069
4105
|
"Depth",
|
4070
4106
|
"Normals",
|
@@ -4075,152 +4111,152 @@ function $i(e) {
|
|
4075
4111
|
"Side by Side",
|
4076
4112
|
"Stacked",
|
4077
4113
|
"Quad"
|
4078
|
-
],
|
4079
|
-
localStorage.setItem(`${n}_mode`,
|
4080
|
-
const
|
4081
|
-
const M = d.get(
|
4082
|
-
if (M !== void 0 && M.dispose(), d.delete(
|
4114
|
+
], W = Z(null), pe = Z(null), ce = Z(null), Re = Z(null), ke = Z(null), ve = Z(null), [B, be] = K(a !== null ? a : "Single"), [O, we] = K(null), [De, Ie] = K(!1), [Pe, Ae] = K(!1), [je, Be] = K(!1), [, Fe] = K(Date.now());
|
4115
|
+
localStorage.setItem(`${n}_mode`, B), localStorage.setItem(`${n}_tlCam`, t), localStorage.setItem(`${n}_trCam`, i), localStorage.setItem(`${n}_blCam`, c), localStorage.setItem(`${n}_brCam`, l);
|
4116
|
+
const re = (v, b) => {
|
4117
|
+
const M = d.get(v.name);
|
4118
|
+
if (M !== void 0 && M.dispose(), d.delete(v.name), v.name === "UI")
|
4083
4119
|
return;
|
4084
|
-
const
|
4085
|
-
switch (
|
4120
|
+
const I = new Ei(v, b);
|
4121
|
+
switch (I.enableDamping = !0, I.dampingFactor = 0.05, v.name) {
|
4086
4122
|
case "Top":
|
4087
4123
|
case "Bottom":
|
4088
4124
|
case "Left":
|
4089
4125
|
case "Right":
|
4090
4126
|
case "Front":
|
4091
4127
|
case "Back":
|
4092
|
-
|
4128
|
+
I.enableRotate = !1;
|
4093
4129
|
break;
|
4094
4130
|
}
|
4095
|
-
d.set(
|
4096
|
-
}, Me = (
|
4097
|
-
const
|
4098
|
-
|
4099
|
-
const M = d.get(
|
4100
|
-
M !== void 0 && (M.dispose(), d.delete(
|
4131
|
+
d.set(v.name, I);
|
4132
|
+
}, Me = (v) => {
|
4133
|
+
const b = h.get(v.name);
|
4134
|
+
b !== void 0 && (f.remove(b), b.dispose(), h.delete(v.name));
|
4135
|
+
const M = d.get(v.name);
|
4136
|
+
M !== void 0 && (M.dispose(), d.delete(v.name));
|
4101
4137
|
}, He = () => {
|
4102
|
-
d.forEach((
|
4103
|
-
|
4104
|
-
const M = h.get(
|
4105
|
-
M !== void 0 && (f.remove(M), M.dispose()), h.delete(
|
4138
|
+
d.forEach((v, b) => {
|
4139
|
+
v.dispose();
|
4140
|
+
const M = h.get(b);
|
4141
|
+
M !== void 0 && (f.remove(M), M.dispose()), h.delete(b), d.delete(b);
|
4106
4142
|
}), d.clear(), h.clear();
|
4107
4143
|
}, Ve = () => {
|
4108
|
-
switch (
|
4144
|
+
switch (B) {
|
4109
4145
|
case "Single":
|
4110
|
-
|
4146
|
+
re(Y, ce.current);
|
4111
4147
|
break;
|
4112
4148
|
case "Side by Side":
|
4113
4149
|
case "Stacked":
|
4114
|
-
|
4150
|
+
re(Y, ce.current), re(oe, Re.current);
|
4115
4151
|
break;
|
4116
4152
|
case "Quad":
|
4117
|
-
|
4153
|
+
re(Y, ce.current), re(oe, Re.current), re(Ge, ke.current), re(We, ve.current);
|
4118
4154
|
break;
|
4119
4155
|
}
|
4120
4156
|
};
|
4121
4157
|
_e(() => {
|
4122
|
-
const
|
4123
|
-
canvas:
|
4158
|
+
const v = new ya({
|
4159
|
+
canvas: W.current,
|
4124
4160
|
stencil: !1
|
4125
4161
|
});
|
4126
|
-
|
4162
|
+
v.autoClear = !1, v.shadowMap.enabled = !0, v.setPixelRatio(devicePixelRatio), v.setClearColor(0), e.three.renderer = v, we(v);
|
4127
4163
|
}, []), _e(() => {
|
4128
|
-
f.name = "Debug Scene", f.uuid = "",
|
4129
|
-
const
|
4130
|
-
|
4164
|
+
f.name = "Debug Scene", f.uuid = "", g.name = "helpers", f.add(g), g.add(S), P.name = "axisHelper", g.add(P), V.name = "interactionHelper", g.add(V), V.visible = !1, X("Top", new q(0, 1e3, 0)), X("Bottom", new q(0, -1e3, 0)), X("Left", new q(-1e3, 0, 0)), X("Right", new q(1e3, 0, 0)), X("Front", new q(0, 0, 1e3)), X("Back", new q(0, 0, -1e3)), X("Orthographic", new q(1e3, 1e3, 1e3)), X("UI", new q());
|
4165
|
+
const v = new At(60, 1, 50, 5e3);
|
4166
|
+
v.name = "Debug", v.position.set(500, 500, 500), v.lookAt(0, 0, 0), r.set("Debug", v), Y = r.get(localStorage.getItem(`${n}_tlCam`)), oe = r.get(localStorage.getItem(`${n}_trCam`)), Ge = r.get(localStorage.getItem(`${n}_blCam`)), We = r.get(localStorage.getItem(`${n}_brCam`));
|
4131
4167
|
}, []), _e(() => {
|
4132
|
-
const
|
4168
|
+
const v = () => {
|
4133
4169
|
m.forEach((C) => {
|
4134
|
-
|
4170
|
+
g.remove(C), C.dispose();
|
4135
4171
|
}), m.clear();
|
4136
|
-
},
|
4172
|
+
}, b = () => {
|
4137
4173
|
Te.traverse((C) => {
|
4138
4174
|
if (C.type.search("Light") > -1) {
|
4139
4175
|
let x;
|
4140
4176
|
switch (C.type) {
|
4141
4177
|
case "DirectionalLight":
|
4142
|
-
x = new Ma(C, 100), x.name = `${C.name}Helper`, m.set(C.name, x),
|
4178
|
+
x = new Ma(C, 100), x.name = `${C.name}Helper`, m.set(C.name, x), g.add(x);
|
4143
4179
|
break;
|
4144
4180
|
case "HemisphereLight":
|
4145
|
-
x = new wa(C, 250), x.name = `${C.name}Helper`, m.set(C.name, x),
|
4181
|
+
x = new wa(C, 250), x.name = `${C.name}Helper`, m.set(C.name, x), g.add(x);
|
4146
4182
|
break;
|
4147
4183
|
case "RectAreaLight":
|
4148
|
-
x = new bi(C), x.name = `${C.name}Helper`, m.set(C.name, x),
|
4184
|
+
x = new bi(C), x.name = `${C.name}Helper`, m.set(C.name, x), g.add(x);
|
4149
4185
|
break;
|
4150
4186
|
case "PointLight":
|
4151
|
-
x = new Ca(C, 100), x.name = `${C.name}Helper`, m.set(C.name, x),
|
4187
|
+
x = new Ca(C, 100), x.name = `${C.name}Helper`, m.set(C.name, x), g.add(x);
|
4152
4188
|
break;
|
4153
4189
|
case "SpotLight":
|
4154
|
-
x = new Sa(C), x.name = `${C.name}Helper`, m.set(C.name, x),
|
4190
|
+
x = new Sa(C), x.name = `${C.name}Helper`, m.set(C.name, x), g.add(x);
|
4155
4191
|
break;
|
4156
4192
|
}
|
4157
4193
|
}
|
4158
4194
|
});
|
4159
4195
|
}, M = (C) => {
|
4160
|
-
|
4196
|
+
g.add(P), v(), ft(Te), f.remove(Te);
|
4161
4197
|
const x = e.scenes.get(C.value.name);
|
4162
4198
|
if (x !== void 0) {
|
4163
|
-
const
|
4164
|
-
e.onSceneSet !== void 0 && e.onSceneSet(
|
4199
|
+
const z = new x();
|
4200
|
+
e.onSceneSet !== void 0 && e.onSceneSet(z), Te = z, e.three.scene = Te, f.add(Te), Nt = !0, b();
|
4165
4201
|
}
|
4166
|
-
},
|
4167
|
-
const x = C.value,
|
4168
|
-
if (
|
4169
|
-
const
|
4170
|
-
h.set(
|
4202
|
+
}, I = (C) => {
|
4203
|
+
const x = C.value, z = e.three.scene?.getObjectByProperty("uuid", x.uuid);
|
4204
|
+
if (z !== void 0 && r.set(x.name, z), z instanceof At) {
|
4205
|
+
const te = new xa(z);
|
4206
|
+
h.set(z.name, te), f.add(te);
|
4171
4207
|
}
|
4172
4208
|
Fe(Date.now());
|
4173
4209
|
}, ge = (C) => {
|
4174
4210
|
const x = h.get(C.value.name);
|
4175
4211
|
x !== void 0 && (f.remove(x), x.dispose()), r.delete(C.value.name), Fe(Date.now());
|
4176
|
-
},
|
4212
|
+
}, le = (C) => {
|
4177
4213
|
const x = Te.getObjectByProperty("uuid", C.value.uuid);
|
4178
|
-
x && x.add(
|
4214
|
+
x && x.add(P);
|
4179
4215
|
};
|
4180
|
-
return R.addEventListener(k.SET_SCENE, M), R.addEventListener(k.ADD_CAMERA,
|
4181
|
-
R.removeEventListener(k.SET_SCENE, M), R.removeEventListener(k.ADD_CAMERA,
|
4216
|
+
return R.addEventListener(k.SET_SCENE, M), R.addEventListener(k.ADD_CAMERA, I), R.addEventListener(k.REMOVE_CAMERA, ge), R.addEventListener(k.SET_OBJECT, le), () => {
|
4217
|
+
R.removeEventListener(k.SET_SCENE, M), R.removeEventListener(k.ADD_CAMERA, I), R.removeEventListener(k.REMOVE_CAMERA, ge), R.removeEventListener(k.SET_OBJECT, le);
|
4182
4218
|
};
|
4183
4219
|
}, []), _e(() => {
|
4184
4220
|
if (O === null)
|
4185
4221
|
return;
|
4186
|
-
let
|
4187
|
-
const
|
4188
|
-
|
4189
|
-
let T =
|
4190
|
-
switch (
|
4222
|
+
let v = window.innerWidth, b = window.innerHeight, M = Math.floor(v / 2), I = Math.floor(b / 2), ge = -1;
|
4223
|
+
const le = () => {
|
4224
|
+
v = window.innerWidth - 300, b = window.innerHeight, M = Math.floor(v / 2), I = Math.floor(b / 2), e.three.resize(v, b), e.onSceneResize !== void 0 && Nt && e.onSceneResize(Te, v, b);
|
4225
|
+
let T = v, U = b;
|
4226
|
+
switch (B) {
|
4191
4227
|
case "Side by Side":
|
4192
|
-
T = M,
|
4228
|
+
T = M, U = b;
|
4193
4229
|
break;
|
4194
4230
|
case "Stacked":
|
4195
|
-
T =
|
4231
|
+
T = v, U = I;
|
4196
4232
|
break;
|
4197
4233
|
case "Quad":
|
4198
|
-
T = M,
|
4234
|
+
T = M, U = I;
|
4199
4235
|
break;
|
4200
4236
|
}
|
4201
|
-
r.forEach((
|
4202
|
-
|
4237
|
+
r.forEach((H) => {
|
4238
|
+
H instanceof en ? (H.left = T / -2, H.right = T / 2, H.top = U / 2, H.bottom = U / -2, H.name === "UI" && (H.position.x = v / 2, H.position.y = b / -2, H.position.z = 100), H.updateProjectionMatrix()) : H instanceof At && (H.aspect = T / U, H.updateProjectionMatrix(), h.get(H.name)?.update());
|
4203
4239
|
});
|
4204
4240
|
}, C = () => {
|
4205
|
-
O.setViewport(0, 0,
|
4241
|
+
O.setViewport(0, 0, v, b), O.setScissor(0, 0, v, b), O.render(f, Y);
|
4206
4242
|
}, x = () => {
|
4207
|
-
if (
|
4208
|
-
O.setViewport(0, 0, M,
|
4243
|
+
if (B === "Side by Side")
|
4244
|
+
O.setViewport(0, 0, M, b), O.setScissor(0, 0, M, b), O.render(f, Y), O.setViewport(M, 0, M, b), O.setScissor(M, 0, M, b), O.render(f, oe);
|
4209
4245
|
else {
|
4210
|
-
const T =
|
4211
|
-
O.setViewport(0, T,
|
4246
|
+
const T = b - I;
|
4247
|
+
O.setViewport(0, T, v, I), O.setScissor(0, T, v, I), O.render(f, Y), O.setViewport(0, 0, v, I), O.setScissor(0, 0, v, I), O.render(f, oe);
|
4212
4248
|
}
|
4213
|
-
},
|
4214
|
-
let T = 0,
|
4215
|
-
|
4216
|
-
},
|
4249
|
+
}, z = () => {
|
4250
|
+
let T = 0, U = 0;
|
4251
|
+
U = b - I, T = 0, O.setViewport(T, U, M, I), O.setScissor(T, U, M, I), O.render(f, Y), T = M, O.setViewport(T, U, M, I), O.setScissor(T, U, M, I), O.render(f, oe), U = 0, T = 0, O.setViewport(T, U, M, I), O.setScissor(T, U, M, I), O.render(f, Ge), T = M, O.setViewport(T, U, M, I), O.setScissor(T, U, M, I), O.render(f, We);
|
4252
|
+
}, te = () => {
|
4217
4253
|
switch (d.forEach((T) => {
|
4218
4254
|
T.update();
|
4219
4255
|
}), h.forEach((T) => {
|
4220
4256
|
T.update();
|
4221
4257
|
}), m.forEach((T) => {
|
4222
4258
|
T.update !== void 0 && T.update();
|
4223
|
-
}), e.onSceneUpdate !== void 0 && Nt && e.onSceneUpdate(Te), O.clear(),
|
4259
|
+
}), e.onSceneUpdate !== void 0 && Nt && e.onSceneUpdate(Te), O.clear(), B) {
|
4224
4260
|
case "Single":
|
4225
4261
|
C();
|
4226
4262
|
break;
|
@@ -4229,116 +4265,116 @@ function $i(e) {
|
|
4229
4265
|
x();
|
4230
4266
|
break;
|
4231
4267
|
case "Quad":
|
4232
|
-
|
4268
|
+
z();
|
4233
4269
|
break;
|
4234
4270
|
}
|
4235
|
-
ge = requestAnimationFrame(
|
4271
|
+
ge = requestAnimationFrame(te);
|
4236
4272
|
};
|
4237
|
-
return Ve(), window.addEventListener("resize",
|
4238
|
-
window.removeEventListener("resize",
|
4273
|
+
return Ve(), window.addEventListener("resize", le), le(), te(), () => {
|
4274
|
+
window.removeEventListener("resize", le), cancelAnimationFrame(ge), ge = -1;
|
4239
4275
|
};
|
4240
|
-
}, [
|
4276
|
+
}, [B, O]), _e(() => {
|
4241
4277
|
if (O !== null) {
|
4242
|
-
const
|
4243
|
-
switch (
|
4278
|
+
const v = new Ea(), b = new me(), M = (C, x, z, te) => {
|
4279
|
+
switch (B) {
|
4244
4280
|
case "Quad":
|
4245
|
-
C <
|
4281
|
+
C < z ? x < te ? v.setFromCamera(b, Y) : v.setFromCamera(b, Ge) : x < te ? v.setFromCamera(b, oe) : v.setFromCamera(b, We);
|
4246
4282
|
break;
|
4247
4283
|
case "Side by Side":
|
4248
|
-
C <
|
4284
|
+
C < z ? v.setFromCamera(b, Y) : v.setFromCamera(b, oe);
|
4249
4285
|
break;
|
4250
4286
|
case "Single":
|
4251
|
-
|
4287
|
+
v.setFromCamera(b, Y);
|
4252
4288
|
break;
|
4253
4289
|
case "Stacked":
|
4254
|
-
x <
|
4290
|
+
x < te ? v.setFromCamera(b, Y) : v.setFromCamera(b, oe);
|
4255
4291
|
break;
|
4256
4292
|
}
|
4257
|
-
},
|
4293
|
+
}, I = (C) => {
|
4258
4294
|
if (!Ct)
|
4259
4295
|
return;
|
4260
|
-
const x = new
|
4296
|
+
const x = new me();
|
4261
4297
|
O.getSize(x);
|
4262
|
-
const
|
4263
|
-
|
4264
|
-
const T = x.x / 2,
|
4265
|
-
|
4298
|
+
const z = Math.min(C.clientX, x.x), te = Math.min(C.clientY, x.y);
|
4299
|
+
b.x = rt(z, 0, x.x, -1, 1), b.y = rt(te, 0, x.y, 1, -1);
|
4300
|
+
const T = x.x / 2, U = x.y / 2, H = () => {
|
4301
|
+
z < T ? b.x = rt(z, 0, T, -1, 1) : b.x = rt(z, T, x.x, -1, 1);
|
4266
4302
|
}, Ne = () => {
|
4267
|
-
|
4303
|
+
te < U ? b.y = rt(te, 0, U, 1, -1) : b.y = rt(te, U, x.y, 1, -1);
|
4268
4304
|
};
|
4269
|
-
switch (
|
4305
|
+
switch (B) {
|
4270
4306
|
case "Quad":
|
4271
|
-
|
4307
|
+
H(), Ne();
|
4272
4308
|
break;
|
4273
4309
|
case "Side by Side":
|
4274
|
-
|
4310
|
+
H();
|
4275
4311
|
break;
|
4276
4312
|
case "Stacked":
|
4277
4313
|
Ne(), Ne();
|
4278
4314
|
break;
|
4279
4315
|
}
|
4280
|
-
M(
|
4281
|
-
const Je =
|
4282
|
-
Je.length > 0 &&
|
4316
|
+
M(z, te, T, U);
|
4317
|
+
const Je = v.intersectObjects(Te.children);
|
4318
|
+
Je.length > 0 && V.position.copy(Je[0].point);
|
4283
4319
|
}, ge = (C) => {
|
4284
4320
|
if (!Ct)
|
4285
4321
|
return;
|
4286
|
-
const x = new
|
4322
|
+
const x = new me();
|
4287
4323
|
if (O.getSize(x), C.clientX >= x.x)
|
4288
4324
|
return;
|
4289
|
-
|
4290
|
-
const
|
4291
|
-
|
4292
|
-
},
|
4293
|
-
return
|
4294
|
-
|
4325
|
+
I(C);
|
4326
|
+
const z = v.intersectObjects(Te.children);
|
4327
|
+
z.length > 0 && e.three.getObject(z[0].object.uuid);
|
4328
|
+
}, le = pe.current;
|
4329
|
+
return le.addEventListener("mousemove", I, !1), le.addEventListener("click", ge, !1), () => {
|
4330
|
+
le.removeEventListener("mousemove", I), le.removeEventListener("click", ge);
|
4295
4331
|
};
|
4296
4332
|
}
|
4297
|
-
}, [
|
4298
|
-
const
|
4299
|
-
return r.forEach((
|
4300
|
-
|
4333
|
+
}, [B, O]);
|
4334
|
+
const ue = [];
|
4335
|
+
return r.forEach((v, b) => {
|
4336
|
+
ue.push(b);
|
4301
4337
|
}), /* @__PURE__ */ u.jsxs("div", { className: "multiview", children: [
|
4302
|
-
/* @__PURE__ */ u.jsx("canvas", { ref:
|
4338
|
+
/* @__PURE__ */ u.jsx("canvas", { ref: W }),
|
4303
4339
|
O !== null && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
4304
|
-
/* @__PURE__ */ u.jsxs("div", { className: `cameras ${
|
4305
|
-
|
4306
|
-
d.get(
|
4307
|
-
const
|
4308
|
-
|
4340
|
+
/* @__PURE__ */ u.jsxs("div", { className: `cameras ${B === "Single" || B === "Stacked" ? "single" : ""}`, ref: pe, children: [
|
4341
|
+
B === "Single" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx(qe, { camera: Y, options: ue, ref: ce, onSelect: (v) => {
|
4342
|
+
d.get(Y.name)?.dispose();
|
4343
|
+
const b = r.get(v);
|
4344
|
+
b !== void 0 && (Me(Y), Y = b, localStorage.setItem(`${n}_tlCam`, b.name), re(b, ce.current));
|
4309
4345
|
} }) }),
|
4310
|
-
(
|
4311
|
-
/* @__PURE__ */ u.jsx(qe, { camera:
|
4312
|
-
d.get(
|
4313
|
-
const
|
4314
|
-
|
4346
|
+
(B === "Side by Side" || B === "Stacked") && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
4347
|
+
/* @__PURE__ */ u.jsx(qe, { camera: Y, options: ue, ref: ce, onSelect: (v) => {
|
4348
|
+
d.get(Y.name)?.dispose();
|
4349
|
+
const b = r.get(v);
|
4350
|
+
b !== void 0 && (Me(Y), Y = b, localStorage.setItem(`${n}_tlCam`, b.name), re(b, ce.current));
|
4315
4351
|
} }),
|
4316
|
-
/* @__PURE__ */ u.jsx(qe, { camera:
|
4317
|
-
d.get(
|
4318
|
-
const
|
4319
|
-
|
4352
|
+
/* @__PURE__ */ u.jsx(qe, { camera: oe, options: ue, ref: Re, onSelect: (v) => {
|
4353
|
+
d.get(oe.name)?.dispose();
|
4354
|
+
const b = r.get(v);
|
4355
|
+
b !== void 0 && (Me(oe), oe = b, localStorage.setItem(`${n}_trCam`, b.name), re(b, Re.current));
|
4320
4356
|
} })
|
4321
4357
|
] }),
|
4322
|
-
|
4323
|
-
/* @__PURE__ */ u.jsx(qe, { camera:
|
4324
|
-
d.get(
|
4325
|
-
const
|
4326
|
-
|
4358
|
+
B === "Quad" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
4359
|
+
/* @__PURE__ */ u.jsx(qe, { camera: Y, options: ue, ref: ce, onSelect: (v) => {
|
4360
|
+
d.get(Y.name)?.dispose();
|
4361
|
+
const b = r.get(v);
|
4362
|
+
b !== void 0 && (Me(Y), Y = b, localStorage.setItem(`${n}_tlCam`, b.name), re(b, ce.current));
|
4327
4363
|
} }),
|
4328
|
-
/* @__PURE__ */ u.jsx(qe, { camera:
|
4329
|
-
d.get(
|
4330
|
-
const
|
4331
|
-
|
4364
|
+
/* @__PURE__ */ u.jsx(qe, { camera: oe, options: ue, ref: Re, onSelect: (v) => {
|
4365
|
+
d.get(oe.name)?.dispose();
|
4366
|
+
const b = r.get(v);
|
4367
|
+
b !== void 0 && (Me(oe), oe = b, localStorage.setItem(`${n}_trCam`, b.name), re(b, Re.current));
|
4332
4368
|
} }),
|
4333
|
-
/* @__PURE__ */ u.jsx(qe, { camera: Ge, options:
|
4369
|
+
/* @__PURE__ */ u.jsx(qe, { camera: Ge, options: ue, ref: ke, onSelect: (v) => {
|
4334
4370
|
d.get(Ge.name)?.dispose();
|
4335
|
-
const
|
4336
|
-
|
4371
|
+
const b = r.get(v);
|
4372
|
+
b !== void 0 && (Me(Ge), Ge = b, localStorage.setItem(`${n}_blCam`, b.name), re(b, ke.current));
|
4337
4373
|
} }),
|
4338
|
-
/* @__PURE__ */ u.jsx(qe, { camera: We, options:
|
4374
|
+
/* @__PURE__ */ u.jsx(qe, { camera: We, options: ue, ref: ve, onSelect: (v) => {
|
4339
4375
|
d.get(We.name)?.dispose();
|
4340
|
-
const
|
4341
|
-
|
4376
|
+
const b = r.get(v);
|
4377
|
+
b !== void 0 && (Me(We), We = b, localStorage.setItem(`${n}_brCam`, b.name), re(b, ve.current));
|
4342
4378
|
} })
|
4343
4379
|
] })
|
4344
4380
|
] }),
|
@@ -4346,46 +4382,46 @@ function $i(e) {
|
|
4346
4382
|
/* @__PURE__ */ u.jsx(
|
4347
4383
|
Ot,
|
4348
4384
|
{
|
4349
|
-
index: Ce.indexOf(
|
4385
|
+
index: Ce.indexOf(B),
|
4350
4386
|
options: Ce,
|
4351
|
-
onSelect: (
|
4352
|
-
|
4387
|
+
onSelect: (v) => {
|
4388
|
+
v !== B && (He(), be(v));
|
4353
4389
|
},
|
4354
4390
|
open: De,
|
4355
|
-
onToggle: (
|
4356
|
-
Ie(
|
4391
|
+
onToggle: (v) => {
|
4392
|
+
Ie(v), Pe && Ae(!1), je && Be(!1);
|
4357
4393
|
}
|
4358
4394
|
}
|
4359
4395
|
),
|
4360
4396
|
/* @__PURE__ */ u.jsx(
|
4361
4397
|
Ot,
|
4362
4398
|
{
|
4363
|
-
index:
|
4364
|
-
options:
|
4365
|
-
onSelect: (
|
4366
|
-
if (
|
4367
|
-
switch (St =
|
4399
|
+
index: ie.indexOf(St),
|
4400
|
+
options: ie,
|
4401
|
+
onSelect: (v) => {
|
4402
|
+
if (v !== St)
|
4403
|
+
switch (St = v, St) {
|
4368
4404
|
case "Depth":
|
4369
|
-
f.overrideMaterial =
|
4405
|
+
f.overrideMaterial = ee;
|
4370
4406
|
break;
|
4371
4407
|
case "Normals":
|
4372
|
-
f.overrideMaterial =
|
4408
|
+
f.overrideMaterial = A;
|
4373
4409
|
break;
|
4374
4410
|
default:
|
4375
4411
|
case "Renderer":
|
4376
4412
|
f.overrideMaterial = null;
|
4377
4413
|
break;
|
4378
4414
|
case "Wireframe":
|
4379
|
-
f.overrideMaterial =
|
4415
|
+
f.overrideMaterial = L;
|
4380
4416
|
break;
|
4381
4417
|
case "UVs":
|
4382
|
-
f.overrideMaterial =
|
4418
|
+
f.overrideMaterial = $;
|
4383
4419
|
break;
|
4384
4420
|
}
|
4385
4421
|
},
|
4386
4422
|
open: Pe,
|
4387
|
-
onToggle: (
|
4388
|
-
De && Ie(!1), Ae(
|
4423
|
+
onToggle: (v) => {
|
4424
|
+
De && Ie(!1), Ae(v), je && Be(!1);
|
4389
4425
|
}
|
4390
4426
|
}
|
4391
4427
|
),
|
@@ -4397,12 +4433,12 @@ function $i(e) {
|
|
4397
4433
|
"Orbit Mode",
|
4398
4434
|
"Selection Mode"
|
4399
4435
|
],
|
4400
|
-
onSelect: (
|
4401
|
-
Ct =
|
4436
|
+
onSelect: (v) => {
|
4437
|
+
Ct = v === "Selection Mode", V.visible = Ct;
|
4402
4438
|
},
|
4403
4439
|
open: je,
|
4404
|
-
onToggle: (
|
4405
|
-
De && Ie(!1), Pe && Ae(!1), Be(
|
4440
|
+
onToggle: (v) => {
|
4441
|
+
De && Ie(!1), Pe && Ae(!1), Be(v);
|
4406
4442
|
}
|
4407
4443
|
}
|
4408
4444
|
)
|