@tomorrowevening/hermes 0.0.15 → 0.0.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/hermes.js +196 -195
- package/dist/hermes.umd.cjs +11 -11
- package/package.json +1 -1
- package/src/core/remote/RemoteTheatre.ts +8 -13
- package/types/core/remote/RemoteTheatre.d.ts +1 -1
package/dist/hermes.js
CHANGED
@@ -157,14 +157,16 @@ function sa(t, n) {
|
|
157
157
|
const vn = () => {
|
158
158
|
};
|
159
159
|
class Ut extends Ct {
|
160
|
-
constructor(
|
161
|
-
super(
|
160
|
+
constructor() {
|
161
|
+
super(...arguments);
|
162
162
|
Z(this, "project");
|
163
|
-
Z(this, "sheets");
|
164
|
-
Z(this, "sheetObjects");
|
165
|
-
Z(this, "sheetObjectCBs");
|
166
|
-
Z(this, "sheetObjectUnsubscribe");
|
167
|
-
|
163
|
+
Z(this, "sheets", /* @__PURE__ */ new Map());
|
164
|
+
Z(this, "sheetObjects", /* @__PURE__ */ new Map());
|
165
|
+
Z(this, "sheetObjectCBs", /* @__PURE__ */ new Map());
|
166
|
+
Z(this, "sheetObjectUnsubscribe", /* @__PURE__ */ new Map());
|
167
|
+
}
|
168
|
+
init(a, e) {
|
169
|
+
this.project = qn(a, e);
|
168
170
|
}
|
169
171
|
dispose() {
|
170
172
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
@@ -193,13 +195,13 @@ class Ut extends Ct {
|
|
193
195
|
u = f.object(e, r), this.sheetObjects.set(l, u), this.sheetObjectCBs.set(l, s !== void 0 ? s : vn);
|
194
196
|
const p = u.onValuesChange((v) => {
|
195
197
|
if (this.app.editor) {
|
196
|
-
for (const
|
197
|
-
const
|
198
|
-
typeof
|
199
|
-
r:
|
200
|
-
g:
|
201
|
-
b:
|
202
|
-
a:
|
198
|
+
for (const x in v) {
|
199
|
+
const C = v[x];
|
200
|
+
typeof C == "object" && na(C) && (v[x] = {
|
201
|
+
r: C.r,
|
202
|
+
g: C.g,
|
203
|
+
b: C.b,
|
204
|
+
a: C.a
|
203
205
|
});
|
204
206
|
}
|
205
207
|
this.app.send({
|
@@ -210,10 +212,9 @@ class Ut extends Ct {
|
|
210
212
|
values: v
|
211
213
|
}
|
212
214
|
});
|
213
|
-
} else {
|
214
|
-
const E = this.sheetObjectCBs.get(l);
|
215
|
-
E !== void 0 && E(v);
|
216
215
|
}
|
216
|
+
const E = this.sheetObjectCBs.get(l);
|
217
|
+
E !== void 0 && E(v);
|
217
218
|
});
|
218
219
|
return this.sheetObjectUnsubscribe.set(l, p), u;
|
219
220
|
}
|
@@ -713,14 +714,14 @@ function va() {
|
|
713
714
|
Xt = 1;
|
714
715
|
var t = hn, n = Symbol.for("react.element"), a = Symbol.for("react.fragment"), e = Object.prototype.hasOwnProperty, r = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, s = { key: !0, ref: !0, __self: !0, __source: !0 };
|
715
716
|
function f(l, u, p) {
|
716
|
-
var v, E = {},
|
717
|
-
p !== void 0 && (
|
717
|
+
var v, E = {}, x = null, C = null;
|
718
|
+
p !== void 0 && (x = "" + p), u.key !== void 0 && (x = "" + u.key), u.ref !== void 0 && (C = u.ref);
|
718
719
|
for (v in u)
|
719
720
|
e.call(u, v) && !s.hasOwnProperty(v) && (E[v] = u[v]);
|
720
721
|
if (l && l.defaultProps)
|
721
722
|
for (v in u = l.defaultProps, u)
|
722
723
|
E[v] === void 0 && (E[v] = u[v]);
|
723
|
-
return { $$typeof: n, type: l, key:
|
724
|
+
return { $$typeof: n, type: l, key: x, ref: C, props: E, _owner: r.current };
|
724
725
|
}
|
725
726
|
return nt.Fragment = a, nt.jsx = f, nt.jsxs = f, nt;
|
726
727
|
}
|
@@ -737,24 +738,24 @@ var at = {};
|
|
737
738
|
var qt;
|
738
739
|
function ba() {
|
739
740
|
return qt || (qt = 1, process.env.NODE_ENV !== "production" && function() {
|
740
|
-
var t = hn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"),
|
741
|
+
var t = hn, n = Symbol.for("react.element"), a = Symbol.for("react.portal"), e = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), f = Symbol.for("react.provider"), l = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), v = Symbol.for("react.suspense_list"), E = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), M = Symbol.iterator, G = "@@iterator";
|
741
742
|
function se(i) {
|
742
743
|
if (i === null || typeof i != "object")
|
743
744
|
return null;
|
744
|
-
var h =
|
745
|
+
var h = M && i[M] || i[G];
|
745
746
|
return typeof h == "function" ? h : null;
|
746
747
|
}
|
747
748
|
var H = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
748
|
-
function
|
749
|
+
function S(i) {
|
749
750
|
{
|
750
|
-
for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0),
|
751
|
-
g[
|
751
|
+
for (var h = arguments.length, g = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
752
|
+
g[w - 1] = arguments[w];
|
752
753
|
K("error", i, g);
|
753
754
|
}
|
754
755
|
}
|
755
756
|
function K(i, h, g) {
|
756
757
|
{
|
757
|
-
var
|
758
|
+
var w = H.ReactDebugCurrentFrame, k = w.getStackAddendum();
|
758
759
|
k !== "" && (h += "%s", g = g.concat([k]));
|
759
760
|
var L = g.map(function(P) {
|
760
761
|
return String(P);
|
@@ -764,17 +765,17 @@ function ba() {
|
|
764
765
|
}
|
765
766
|
var fe = !1, le = !1, ee = !1, d = !1, m = !1, b;
|
766
767
|
b = Symbol.for("react.module.reference");
|
767
|
-
function
|
768
|
-
return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || m || i === r || i === p || i === v || d || i ===
|
768
|
+
function O(i) {
|
769
|
+
return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || m || i === r || i === p || i === v || d || i === C || fe || le || ee || typeof i == "object" && i !== null && (i.$$typeof === x || i.$$typeof === E || i.$$typeof === f || i.$$typeof === l || i.$$typeof === u || // This needs to include all possible module reference object
|
769
770
|
// types supported by any Flight configuration anywhere since
|
770
771
|
// we don't know which Flight build this will end up being used
|
771
772
|
// with.
|
772
773
|
i.$$typeof === b || i.getModuleId !== void 0));
|
773
774
|
}
|
774
775
|
function B(i, h, g) {
|
775
|
-
var
|
776
|
-
if (
|
777
|
-
return
|
776
|
+
var w = i.displayName;
|
777
|
+
if (w)
|
778
|
+
return w;
|
778
779
|
var k = h.displayName || h.name || "";
|
779
780
|
return k !== "" ? g + "(" + k + ")" : g;
|
780
781
|
}
|
@@ -784,7 +785,7 @@ function ba() {
|
|
784
785
|
function F(i) {
|
785
786
|
if (i == null)
|
786
787
|
return null;
|
787
|
-
if (typeof i.tag == "number" &&
|
788
|
+
if (typeof i.tag == "number" && S("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
788
789
|
return i.displayName || i.name || null;
|
789
790
|
if (typeof i == "string")
|
790
791
|
return i;
|
@@ -813,9 +814,9 @@ function ba() {
|
|
813
814
|
case u:
|
814
815
|
return B(i, i.render, "ForwardRef");
|
815
816
|
case E:
|
816
|
-
var
|
817
|
-
return
|
818
|
-
case
|
817
|
+
var w = i.displayName || null;
|
818
|
+
return w !== null ? w : F(i.type) || "Memo";
|
819
|
+
case x: {
|
819
820
|
var k = i, L = k._payload, P = k._init;
|
820
821
|
try {
|
821
822
|
return F(P(L));
|
@@ -826,14 +827,14 @@ function ba() {
|
|
826
827
|
}
|
827
828
|
return null;
|
828
829
|
}
|
829
|
-
var D = Object.assign, U = 0, J,
|
830
|
+
var D = Object.assign, U = 0, J, R, I, X, me, Re, Xe;
|
830
831
|
function ct() {
|
831
832
|
}
|
832
833
|
ct.__reactDisabledLog = !0;
|
833
834
|
function Ot() {
|
834
835
|
{
|
835
836
|
if (U === 0) {
|
836
|
-
J = console.log,
|
837
|
+
J = console.log, R = console.info, I = console.warn, X = console.error, me = console.group, Re = console.groupCollapsed, Xe = console.groupEnd;
|
837
838
|
var i = {
|
838
839
|
configurable: !0,
|
839
840
|
enumerable: !0,
|
@@ -866,7 +867,7 @@ function ba() {
|
|
866
867
|
value: J
|
867
868
|
}),
|
868
869
|
info: D({}, i, {
|
869
|
-
value:
|
870
|
+
value: R
|
870
871
|
}),
|
871
872
|
warn: D({}, i, {
|
872
873
|
value: I
|
@@ -885,7 +886,7 @@ function ba() {
|
|
885
886
|
})
|
886
887
|
});
|
887
888
|
}
|
888
|
-
U < 0 &&
|
889
|
+
U < 0 && S("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
889
890
|
}
|
890
891
|
}
|
891
892
|
var qe = H.ReactCurrentDispatcher, Ze;
|
@@ -895,8 +896,8 @@ function ba() {
|
|
895
896
|
try {
|
896
897
|
throw Error();
|
897
898
|
} catch (k) {
|
898
|
-
var
|
899
|
-
Ze =
|
899
|
+
var w = k.stack.trim().match(/\n( *(at )?)/);
|
900
|
+
Ze = w && w[1] || "";
|
900
901
|
}
|
901
902
|
return `
|
902
903
|
` + Ze + i;
|
@@ -915,7 +916,7 @@ function ba() {
|
|
915
916
|
if (g !== void 0)
|
916
917
|
return g;
|
917
918
|
}
|
918
|
-
var
|
919
|
+
var w;
|
919
920
|
$e = !0;
|
920
921
|
var k = Error.prepareStackTrace;
|
921
922
|
Error.prepareStackTrace = void 0;
|
@@ -934,14 +935,14 @@ function ba() {
|
|
934
935
|
try {
|
935
936
|
Reflect.construct(P, []);
|
936
937
|
} catch (Ee) {
|
937
|
-
|
938
|
+
w = Ee;
|
938
939
|
}
|
939
940
|
Reflect.construct(i, [], P);
|
940
941
|
} else {
|
941
942
|
try {
|
942
943
|
P.call();
|
943
944
|
} catch (Ee) {
|
944
|
-
|
945
|
+
w = Ee;
|
945
946
|
}
|
946
947
|
i.call(P.prototype);
|
947
948
|
}
|
@@ -949,23 +950,23 @@ function ba() {
|
|
949
950
|
try {
|
950
951
|
throw Error();
|
951
952
|
} catch (Ee) {
|
952
|
-
|
953
|
+
w = Ee;
|
953
954
|
}
|
954
955
|
i();
|
955
956
|
}
|
956
957
|
} catch (Ee) {
|
957
|
-
if (Ee &&
|
958
|
-
for (var
|
959
|
-
`), ce =
|
960
|
-
`), W =
|
958
|
+
if (Ee && w && typeof Ee.stack == "string") {
|
959
|
+
for (var T = Ee.stack.split(`
|
960
|
+
`), ce = w.stack.split(`
|
961
|
+
`), W = T.length - 1, q = ce.length - 1; W >= 1 && q >= 0 && T[W] !== ce[q]; )
|
961
962
|
q--;
|
962
963
|
for (; W >= 1 && q >= 0; W--, q--)
|
963
|
-
if (
|
964
|
+
if (T[W] !== ce[q]) {
|
964
965
|
if (W !== 1 || q !== 1)
|
965
966
|
do
|
966
|
-
if (W--, q--, q < 0 ||
|
967
|
+
if (W--, q--, q < 0 || T[W] !== ce[q]) {
|
967
968
|
var ge = `
|
968
|
-
` +
|
969
|
+
` + T[W].replace(" at new ", " at ");
|
969
970
|
return i.displayName && ge.includes("<anonymous>") && (ge = ge.replace("<anonymous>", i.displayName)), typeof i == "function" && _e.set(i, ge), ge;
|
970
971
|
}
|
971
972
|
while (W >= 1 && q >= 0);
|
@@ -1004,8 +1005,8 @@ function ba() {
|
|
1004
1005
|
return ut(i.render);
|
1005
1006
|
case E:
|
1006
1007
|
return je(i.type, h, g);
|
1007
|
-
case
|
1008
|
-
var
|
1008
|
+
case x: {
|
1009
|
+
var w = i, k = w._payload, L = w._init;
|
1009
1010
|
try {
|
1010
1011
|
return je(L(k), h, g);
|
1011
1012
|
} catch {
|
@@ -1022,22 +1023,22 @@ function ba() {
|
|
1022
1023
|
} else
|
1023
1024
|
Je.setExtraStackFrame(null);
|
1024
1025
|
}
|
1025
|
-
function ke(i, h, g,
|
1026
|
+
function ke(i, h, g, w, k) {
|
1026
1027
|
{
|
1027
1028
|
var L = Function.call.bind(Ge);
|
1028
1029
|
for (var P in i)
|
1029
1030
|
if (L(i, P)) {
|
1030
|
-
var
|
1031
|
+
var T = void 0;
|
1031
1032
|
try {
|
1032
1033
|
if (typeof i[P] != "function") {
|
1033
|
-
var ce = Error((
|
1034
|
+
var ce = Error((w || "React class") + ": " + g + " type `" + P + "` is invalid; it must be a function, usually from the `prop-types` package, but received `" + typeof i[P] + "`.This often happens because of typos such as `PropTypes.function` instead of `PropTypes.func`.");
|
1034
1035
|
throw ce.name = "Invariant Violation", ce;
|
1035
1036
|
}
|
1036
|
-
|
1037
|
+
T = i[P](h, P, w, g, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
1037
1038
|
} catch (W) {
|
1038
|
-
|
1039
|
+
T = W;
|
1039
1040
|
}
|
1040
|
-
|
1041
|
+
T && !(T instanceof Error) && (Se(k), S("%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", g, P, typeof T), Se(null)), T instanceof Error && !(T.message in ft) && (ft[T.message] = !0, Se(k), S("Failed %s type: %s", g, T.message), Se(null));
|
1041
1042
|
}
|
1042
1043
|
}
|
1043
1044
|
}
|
@@ -1063,7 +1064,7 @@ function ba() {
|
|
1063
1064
|
}
|
1064
1065
|
function mt(i) {
|
1065
1066
|
if (et(i))
|
1066
|
-
return
|
1067
|
+
return S("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", ht(i)), pt(i);
|
1067
1068
|
}
|
1068
1069
|
var Oe = H.ReactCurrentOwner, Pt = {
|
1069
1070
|
key: !0,
|
@@ -1091,13 +1092,13 @@ function ba() {
|
|
1091
1092
|
function A(i, h) {
|
1092
1093
|
if (typeof i.ref == "string" && Oe.current && h && Oe.current.stateNode !== h) {
|
1093
1094
|
var g = F(Oe.current.type);
|
1094
|
-
ve[g] || (
|
1095
|
+
ve[g] || (S('Component "%s" contains the string ref "%s". Support for string refs will be removed in a future major release. This case cannot be automatically converted to an arrow function. We ask you to manually fix this case by using useRef() or createRef() instead. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-string-ref', F(Oe.current.type), i.ref), ve[g] = !0);
|
1095
1096
|
}
|
1096
1097
|
}
|
1097
1098
|
function N(i, h) {
|
1098
1099
|
{
|
1099
1100
|
var g = function() {
|
1100
|
-
gt || (gt = !0,
|
1101
|
+
gt || (gt = !0, S("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
1101
1102
|
};
|
1102
1103
|
g.isReactWarning = !0, Object.defineProperty(i, "key", {
|
1103
1104
|
get: g,
|
@@ -1108,7 +1109,7 @@ function ba() {
|
|
1108
1109
|
function te(i, h) {
|
1109
1110
|
{
|
1110
1111
|
var g = function() {
|
1111
|
-
tt || (tt = !0,
|
1112
|
+
tt || (tt = !0, S("%s: `ref` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://reactjs.org/link/special-props)", h));
|
1112
1113
|
};
|
1113
1114
|
g.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
1114
1115
|
get: g,
|
@@ -1116,8 +1117,8 @@ function ba() {
|
|
1116
1117
|
});
|
1117
1118
|
}
|
1118
1119
|
}
|
1119
|
-
var be = function(i, h, g,
|
1120
|
-
var
|
1120
|
+
var be = function(i, h, g, w, k, L, P) {
|
1121
|
+
var T = {
|
1121
1122
|
// This tag allows us to uniquely identify this as a React Element
|
1122
1123
|
$$typeof: n,
|
1123
1124
|
// Built-in properties that belong on the element
|
@@ -1128,27 +1129,27 @@ function ba() {
|
|
1128
1129
|
// Record the component responsible for creating this element.
|
1129
1130
|
_owner: L
|
1130
1131
|
};
|
1131
|
-
return
|
1132
|
+
return T._store = {}, Object.defineProperty(T._store, "validated", {
|
1132
1133
|
configurable: !1,
|
1133
1134
|
enumerable: !1,
|
1134
1135
|
writable: !0,
|
1135
1136
|
value: !1
|
1136
|
-
}), Object.defineProperty(
|
1137
|
+
}), Object.defineProperty(T, "_self", {
|
1137
1138
|
configurable: !1,
|
1138
1139
|
enumerable: !1,
|
1139
1140
|
writable: !1,
|
1140
|
-
value:
|
1141
|
-
}), Object.defineProperty(
|
1141
|
+
value: w
|
1142
|
+
}), Object.defineProperty(T, "_source", {
|
1142
1143
|
configurable: !1,
|
1143
1144
|
enumerable: !1,
|
1144
1145
|
writable: !1,
|
1145
1146
|
value: k
|
1146
|
-
}), Object.freeze && (Object.freeze(
|
1147
|
+
}), Object.freeze && (Object.freeze(T.props), Object.freeze(T)), T;
|
1147
1148
|
};
|
1148
|
-
function ue(i, h, g,
|
1149
|
+
function ue(i, h, g, w, k) {
|
1149
1150
|
{
|
1150
|
-
var L, P = {},
|
1151
|
-
g !== void 0 && (mt(g),
|
1151
|
+
var L, P = {}, T = null, ce = null;
|
1152
|
+
g !== void 0 && (mt(g), T = "" + g), y(h) && (mt(h.key), T = "" + h.key), o(h) && (ce = h.ref, A(h, k));
|
1152
1153
|
for (L in h)
|
1153
1154
|
Ge.call(h, L) && !Pt.hasOwnProperty(L) && (P[L] = h[L]);
|
1154
1155
|
if (i && i.defaultProps) {
|
@@ -1156,11 +1157,11 @@ function ba() {
|
|
1156
1157
|
for (L in W)
|
1157
1158
|
P[L] === void 0 && (P[L] = W[L]);
|
1158
1159
|
}
|
1159
|
-
if (
|
1160
|
+
if (T || ce) {
|
1160
1161
|
var q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
1161
|
-
|
1162
|
+
T && N(P, q), ce && te(P, q);
|
1162
1163
|
}
|
1163
|
-
return be(i,
|
1164
|
+
return be(i, T, ce, k, w, Oe.current, P);
|
1164
1165
|
}
|
1165
1166
|
}
|
1166
1167
|
var vt = H.ReactCurrentOwner, bt = H.ReactDebugCurrentFrame;
|
@@ -1221,8 +1222,8 @@ Check the top-level render call using <` + g + ">.");
|
|
1221
1222
|
if (Te[g])
|
1222
1223
|
return;
|
1223
1224
|
Te[g] = !0;
|
1224
|
-
var
|
1225
|
-
i && i._owner && i._owner !== vt.current && (
|
1225
|
+
var w = "";
|
1226
|
+
i && i._owner && i._owner !== vt.current && (w = " It was passed a child from " + F(i._owner.type) + "."), ye(i), S('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', g, w), ye(null);
|
1226
1227
|
}
|
1227
1228
|
}
|
1228
1229
|
function Gt(i, h) {
|
@@ -1231,8 +1232,8 @@ Check the top-level render call using <` + g + ">.");
|
|
1231
1232
|
return;
|
1232
1233
|
if (Qe(i))
|
1233
1234
|
for (var g = 0; g < i.length; g++) {
|
1234
|
-
var
|
1235
|
-
pe(
|
1235
|
+
var w = i[g];
|
1236
|
+
pe(w) && $t(w, h);
|
1236
1237
|
}
|
1237
1238
|
else if (pe(i))
|
1238
1239
|
i._store && (i._store.validated = !0);
|
@@ -1259,38 +1260,38 @@ Check the top-level render call using <` + g + ">.");
|
|
1259
1260
|
else
|
1260
1261
|
return;
|
1261
1262
|
if (g) {
|
1262
|
-
var
|
1263
|
-
ke(g, i.props, "prop",
|
1263
|
+
var w = F(h);
|
1264
|
+
ke(g, i.props, "prop", w, i);
|
1264
1265
|
} else if (h.PropTypes !== void 0 && !he) {
|
1265
1266
|
he = !0;
|
1266
1267
|
var k = F(h);
|
1267
|
-
|
1268
|
+
S("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", k || "Unknown");
|
1268
1269
|
}
|
1269
|
-
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved &&
|
1270
|
+
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && S("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1270
1271
|
}
|
1271
1272
|
}
|
1272
1273
|
function On(i) {
|
1273
1274
|
{
|
1274
1275
|
for (var h = Object.keys(i.props), g = 0; g < h.length; g++) {
|
1275
|
-
var
|
1276
|
-
if (
|
1277
|
-
ye(i),
|
1276
|
+
var w = h[g];
|
1277
|
+
if (w !== "children" && w !== "key") {
|
1278
|
+
ye(i), S("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), ye(null);
|
1278
1279
|
break;
|
1279
1280
|
}
|
1280
1281
|
}
|
1281
|
-
i.ref !== null && (ye(i),
|
1282
|
+
i.ref !== null && (ye(i), S("Invalid attribute `ref` supplied to `React.Fragment`."), ye(null));
|
1282
1283
|
}
|
1283
1284
|
}
|
1284
|
-
function Vt(i, h, g,
|
1285
|
+
function Vt(i, h, g, w, k, L) {
|
1285
1286
|
{
|
1286
|
-
var P =
|
1287
|
+
var P = O(i);
|
1287
1288
|
if (!P) {
|
1288
|
-
var
|
1289
|
-
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (
|
1289
|
+
var T = "";
|
1290
|
+
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (T += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1290
1291
|
var ce = Ae(k);
|
1291
|
-
ce ?
|
1292
|
+
ce ? T += ce : T += Ve();
|
1292
1293
|
var W;
|
1293
|
-
i === null ? W = "null" : Qe(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (F(i.type) || "Unknown") + " />",
|
1294
|
+
i === null ? W = "null" : Qe(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (F(i.type) || "Unknown") + " />", T = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, S("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, T);
|
1294
1295
|
}
|
1295
1296
|
var q = ue(i, h, g, k, L);
|
1296
1297
|
if (q == null)
|
@@ -1298,13 +1299,13 @@ Check the top-level render call using <` + g + ">.");
|
|
1298
1299
|
if (P) {
|
1299
1300
|
var ge = h.children;
|
1300
1301
|
if (ge !== void 0)
|
1301
|
-
if (
|
1302
|
+
if (w)
|
1302
1303
|
if (Qe(ge)) {
|
1303
1304
|
for (var Ye = 0; Ye < ge.length; Ye++)
|
1304
1305
|
Gt(ge[Ye], i);
|
1305
1306
|
Object.freeze && Object.freeze(ge);
|
1306
1307
|
} else
|
1307
|
-
|
1308
|
+
S("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1308
1309
|
else
|
1309
1310
|
Gt(ge, i);
|
1310
1311
|
}
|
@@ -1941,9 +1942,9 @@ function Zt(t, n, a) {
|
|
1941
1942
|
type: `${typeof f[u]}`,
|
1942
1943
|
value: f[u],
|
1943
1944
|
onChange: (p, v) => {
|
1944
|
-
var
|
1945
|
+
var x;
|
1945
1946
|
a.updateObject(n.uuid, `material.${r}`, v);
|
1946
|
-
const E = (
|
1947
|
+
const E = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
|
1947
1948
|
E !== void 0 && Q(E, `material.${r}`, v);
|
1948
1949
|
}
|
1949
1950
|
});
|
@@ -1963,12 +1964,12 @@ function Zt(t, n, a) {
|
|
1963
1964
|
title: De(r),
|
1964
1965
|
type: "image",
|
1965
1966
|
value: p,
|
1966
|
-
onChange: (E,
|
1967
|
-
var
|
1968
|
-
a.createTexture(n.uuid, `material.${r}`,
|
1969
|
-
const
|
1970
|
-
|
1971
|
-
Q(
|
1967
|
+
onChange: (E, x) => {
|
1968
|
+
var M;
|
1969
|
+
a.createTexture(n.uuid, `material.${r}`, x);
|
1970
|
+
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
1971
|
+
C !== void 0 && Nt(x).then((G) => {
|
1972
|
+
Q(C, `material.${r}`, G), Q(C, "material.needsUpdate", !0);
|
1972
1973
|
});
|
1973
1974
|
}
|
1974
1975
|
}) : l.push({
|
@@ -1976,11 +1977,11 @@ function Zt(t, n, a) {
|
|
1976
1977
|
prop: `material.${r}.${u}`,
|
1977
1978
|
type: `${typeof t[r][u]}`,
|
1978
1979
|
value: f[u],
|
1979
|
-
onChange: (E,
|
1980
|
-
var
|
1981
|
-
a.updateObject(n.uuid, `material.${r}.${u}`,
|
1982
|
-
const
|
1983
|
-
|
1980
|
+
onChange: (E, x) => {
|
1981
|
+
var M;
|
1982
|
+
a.updateObject(n.uuid, `material.${r}.${u}`, x);
|
1983
|
+
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
1984
|
+
C !== void 0 && Q(C, `material.${r}.${u}`, x);
|
1984
1985
|
}
|
1985
1986
|
});
|
1986
1987
|
break;
|
@@ -1989,23 +1990,23 @@ function Zt(t, n, a) {
|
|
1989
1990
|
title: De(u),
|
1990
1991
|
type: "image",
|
1991
1992
|
value: p.value.src,
|
1992
|
-
onChange: (E,
|
1993
|
-
var
|
1994
|
-
a.createTexture(n.uuid, `material.${r}.${u}.value`,
|
1995
|
-
const
|
1996
|
-
|
1997
|
-
Q(
|
1993
|
+
onChange: (E, x) => {
|
1994
|
+
var M;
|
1995
|
+
a.createTexture(n.uuid, `material.${r}.${u}.value`, x);
|
1996
|
+
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
1997
|
+
C !== void 0 && Nt(x).then((G) => {
|
1998
|
+
Q(C, `material.${r}.${u}.value`, G);
|
1998
1999
|
});
|
1999
2000
|
}
|
2000
2001
|
}) : l.push({
|
2001
2002
|
title: u,
|
2002
2003
|
type: `${typeof p.value}`,
|
2003
2004
|
value: p.value,
|
2004
|
-
onChange: (E,
|
2005
|
-
var
|
2006
|
-
a.updateObject(n.uuid, `material.${r}.${u}.value`,
|
2007
|
-
const
|
2008
|
-
|
2005
|
+
onChange: (E, x) => {
|
2006
|
+
var M;
|
2007
|
+
a.updateObject(n.uuid, `material.${r}.${u}.value`, x);
|
2008
|
+
const C = (M = a.scene) == null ? void 0 : M.getObjectByProperty("uuid", n.uuid);
|
2009
|
+
C !== void 0 && Q(C, `material.${r}.${u}.value`, x);
|
2009
2010
|
}
|
2010
2011
|
});
|
2011
2012
|
break;
|
@@ -2058,22 +2059,22 @@ function it(t) {
|
|
2058
2059
|
const [a, e] = oe(n), r = Ce(null), s = Ce(null), f = Ce(null);
|
2059
2060
|
Fe(() => {
|
2060
2061
|
var K;
|
2061
|
-
let v = !1, E = -1,
|
2062
|
-
const
|
2063
|
-
v = !0,
|
2062
|
+
let v = !1, E = -1, x = 0, C = Number(a);
|
2063
|
+
const M = (fe) => {
|
2064
|
+
v = !0, x = C, E = fe.clientX;
|
2064
2065
|
}, G = (fe) => {
|
2065
2066
|
if (!v)
|
2066
2067
|
return;
|
2067
2068
|
const le = t.step !== void 0 ? t.step : 1, ee = (fe.clientX - E) * le;
|
2068
|
-
|
2069
|
+
C = Number((x + ee).toFixed(4)), s.current !== null && (s.current.value = C.toString()), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, C);
|
2069
2070
|
}, se = () => {
|
2070
2071
|
v = !1;
|
2071
2072
|
}, H = () => {
|
2072
2073
|
v = !1;
|
2073
|
-
},
|
2074
|
-
return
|
2074
|
+
}, S = t.type === "number";
|
2075
|
+
return S && ((K = r.current) == null || K.addEventListener("mousedown", M, !1), document.addEventListener("mouseup", se, !1), document.addEventListener("mousemove", G, !1), document.addEventListener("contextmenu", H, !1)), () => {
|
2075
2076
|
var fe;
|
2076
|
-
|
2077
|
+
S && ((fe = r.current) == null || fe.removeEventListener("mousedown", M), document.removeEventListener("mouseup", se), document.removeEventListener("mousemove", G), document.removeEventListener("contextmenu", H));
|
2077
2078
|
};
|
2078
2079
|
}, [a]);
|
2079
2080
|
const l = t.type === "string" && (a.length > 100 || a.search(`
|
@@ -2577,15 +2578,15 @@ function hi(t) {
|
|
2577
2578
|
e(u.uuid, u.key, p), e(u.uuid, "material.needsUpdate", !0);
|
2578
2579
|
});
|
2579
2580
|
}, f = (l) => {
|
2580
|
-
var
|
2581
|
+
var x;
|
2581
2582
|
if (!n())
|
2582
2583
|
return;
|
2583
|
-
const { key: u, uuid: p, value: v } = l.value, E = (
|
2584
|
+
const { key: u, uuid: p, value: v } = l.value, E = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
|
2584
2585
|
if (E !== void 0)
|
2585
2586
|
try {
|
2586
2587
|
E[u](v);
|
2587
|
-
} catch (
|
2588
|
-
console.log("Error requesting method:"), console.log(
|
2588
|
+
} catch (C) {
|
2589
|
+
console.log("Error requesting method:"), console.log(C), console.log(u), console.log(v);
|
2589
2590
|
}
|
2590
2591
|
};
|
2591
2592
|
return Fe(() => (_.addEventListener(j.GET_OBJECT, a), _.addEventListener(j.UPDATE_OBJECT, r), _.addEventListener(j.CREATE_TEXTURE, s), _.addEventListener(j.REQUEST_METHOD, f), () => {
|
@@ -2652,13 +2653,13 @@ class Ka extends sn {
|
|
2652
2653
|
let s = r.NONE;
|
2653
2654
|
const f = 1e-6, l = new Ht(), u = new Ht();
|
2654
2655
|
let p = 1;
|
2655
|
-
const v = new Y(), E = new de(),
|
2656
|
+
const v = new Y(), E = new de(), x = new de(), C = new de(), M = new de(), G = new de(), se = new de(), H = new de(), S = new de(), K = new de(), fe = new Y(), le = new de();
|
2656
2657
|
let ee = !1;
|
2657
2658
|
const d = [], m = {};
|
2658
2659
|
function b(o) {
|
2659
2660
|
return o !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * o : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
2660
2661
|
}
|
2661
|
-
function
|
2662
|
+
function O(o) {
|
2662
2663
|
const y = Math.abs(o) / (100 * (window.devicePixelRatio | 0));
|
2663
2664
|
return Math.pow(0.95, e.zoomSpeed * y);
|
2664
2665
|
}
|
@@ -2694,7 +2695,7 @@ class Ka extends sn {
|
|
2694
2695
|
function J(o) {
|
2695
2696
|
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2696
2697
|
}
|
2697
|
-
function
|
2698
|
+
function R(o) {
|
2698
2699
|
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2699
2700
|
}
|
2700
2701
|
function I(o, y) {
|
@@ -2714,21 +2715,21 @@ class Ka extends sn {
|
|
2714
2715
|
I(o.clientX, o.clientX), H.set(o.clientX, o.clientY);
|
2715
2716
|
}
|
2716
2717
|
function Xe(o) {
|
2717
|
-
|
2718
|
+
M.set(o.clientX, o.clientY);
|
2718
2719
|
}
|
2719
2720
|
function ct(o) {
|
2720
|
-
|
2721
|
+
x.set(o.clientX, o.clientY), C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
|
2721
2722
|
const y = e.domElement;
|
2722
|
-
B(2 * Math.PI *
|
2723
|
+
B(2 * Math.PI * C.x / y.clientHeight), $(2 * Math.PI * C.y / y.clientHeight), E.copy(x), e.update();
|
2723
2724
|
}
|
2724
2725
|
function Ot(o) {
|
2725
|
-
|
2726
|
+
S.set(o.clientX, o.clientY), K.subVectors(S, H), K.y > 0 ? J(O(K.y)) : K.y < 0 && R(O(K.y)), H.copy(S), e.update();
|
2726
2727
|
}
|
2727
2728
|
function Tt(o) {
|
2728
|
-
G.set(o.clientX, o.clientY), se.subVectors(G,
|
2729
|
+
G.set(o.clientX, o.clientY), se.subVectors(G, M).multiplyScalar(e.panSpeed), U(se.x, se.y), M.copy(G), e.update();
|
2729
2730
|
}
|
2730
2731
|
function qe(o) {
|
2731
|
-
I(o.clientX, o.clientY), o.deltaY < 0 ?
|
2732
|
+
I(o.clientX, o.clientY), o.deltaY < 0 ? R(O(o.deltaY)) : o.deltaY > 0 && J(O(o.deltaY)), e.update();
|
2732
2733
|
}
|
2733
2734
|
function Ze(o) {
|
2734
2735
|
let y = !1;
|
@@ -2758,10 +2759,10 @@ class Ka extends sn {
|
|
2758
2759
|
}
|
2759
2760
|
function $e(o) {
|
2760
2761
|
if (d.length === 1)
|
2761
|
-
|
2762
|
+
M.set(o.pageX, o.pageY);
|
2762
2763
|
else {
|
2763
2764
|
const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
|
2764
|
-
|
2765
|
+
M.set(A, N);
|
2765
2766
|
}
|
2766
2767
|
}
|
2767
2768
|
function _e(o) {
|
@@ -2776,14 +2777,14 @@ class Ka extends sn {
|
|
2776
2777
|
}
|
2777
2778
|
function ut(o) {
|
2778
2779
|
if (d.length == 1)
|
2779
|
-
|
2780
|
+
x.set(o.pageX, o.pageY);
|
2780
2781
|
else {
|
2781
2782
|
const A = ve(o), N = 0.5 * (o.pageX + A.x), te = 0.5 * (o.pageY + A.y);
|
2782
|
-
|
2783
|
+
x.set(N, te);
|
2783
2784
|
}
|
2784
|
-
|
2785
|
+
C.subVectors(x, E).multiplyScalar(e.rotateSpeed);
|
2785
2786
|
const y = e.domElement;
|
2786
|
-
B(2 * Math.PI *
|
2787
|
+
B(2 * Math.PI * C.x / y.clientHeight), $(2 * Math.PI * C.y / y.clientHeight), E.copy(x);
|
2787
2788
|
}
|
2788
2789
|
function dt(o) {
|
2789
2790
|
if (d.length === 1)
|
@@ -2792,11 +2793,11 @@ class Ka extends sn {
|
|
2792
2793
|
const y = ve(o), A = 0.5 * (o.pageX + y.x), N = 0.5 * (o.pageY + y.y);
|
2793
2794
|
G.set(A, N);
|
2794
2795
|
}
|
2795
|
-
se.subVectors(G,
|
2796
|
+
se.subVectors(G, M).multiplyScalar(e.panSpeed), U(se.x, se.y), M.copy(G);
|
2796
2797
|
}
|
2797
2798
|
function je(o) {
|
2798
2799
|
const y = ve(o), A = o.pageX - y.x, N = o.pageY - y.y, te = Math.sqrt(A * A + N * N);
|
2799
|
-
|
2800
|
+
S.set(0, te), K.set(0, Math.pow(S.y / H.y, e.zoomSpeed)), J(K.y), H.copy(S);
|
2800
2801
|
const be = (o.pageX + y.x) * 0.5, ue = (o.pageY + y.y) * 0.5;
|
2801
2802
|
I(be, ue);
|
2802
2803
|
}
|
@@ -3060,11 +3061,11 @@ st.add(ot);
|
|
3060
3061
|
ot.visible = !1;
|
3061
3062
|
let wt = !1, V = ne.get("Debug"), re = ne.get("Orthographic"), Ne = ne.get("Front"), Le = ne.get("Top"), on = !1;
|
3062
3063
|
function pi(t) {
|
3063
|
-
const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, f] = oe(!1), [l, u] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()),
|
3064
|
+
const [n, a] = oe(t.mode !== void 0 ? t.mode : "Single"), [e, r] = oe(null), [s, f] = oe(!1), [l, u] = oe(!1), [p, v] = oe(!1), [, E] = oe(Date.now()), x = Ce(null), C = Ce(null), M = Ce(null), G = Ce(null), se = Ce(null), H = Ce(null), S = (d, m) => {
|
3064
3065
|
const b = ie.get(d.name);
|
3065
3066
|
b !== void 0 && b.dispose(), ie.delete(d.name);
|
3066
|
-
const
|
3067
|
-
|
3067
|
+
const O = we.get(d.name);
|
3068
|
+
O !== void 0 && (z.remove(O), O.dispose()), we.delete(d.name);
|
3068
3069
|
const B = new Ka(d, m);
|
3069
3070
|
switch (B.enableDamping = !0, B.dampingFactor = 0.05, d.name) {
|
3070
3071
|
case "Top":
|
@@ -3094,37 +3095,37 @@ function pi(t) {
|
|
3094
3095
|
}, le = () => {
|
3095
3096
|
switch (n) {
|
3096
3097
|
case "Single":
|
3097
|
-
|
3098
|
+
S(V, M.current);
|
3098
3099
|
break;
|
3099
3100
|
case "Side by Side":
|
3100
3101
|
case "Stacked":
|
3101
|
-
|
3102
|
+
S(V, M.current), S(re, G.current);
|
3102
3103
|
break;
|
3103
3104
|
case "Quad":
|
3104
|
-
|
3105
|
+
S(V, M.current), S(re, G.current), S(Ne, se.current), S(Le, H.current);
|
3105
3106
|
break;
|
3106
3107
|
}
|
3107
3108
|
};
|
3108
3109
|
Fe(() => {
|
3109
3110
|
const d = new Hn({
|
3110
|
-
canvas:
|
3111
|
+
canvas: x.current,
|
3111
3112
|
stencil: !1
|
3112
3113
|
});
|
3113
3114
|
d.autoClear = !1, d.shadowMap.enabled = !0, d.setPixelRatio(devicePixelRatio), d.setClearColor(0), r(d);
|
3114
3115
|
}, []), Fe(() => {
|
3115
|
-
const d = (
|
3116
|
+
const d = (O) => {
|
3116
3117
|
gn(xe), z.remove(xe);
|
3117
|
-
const B = t.scenes.get(
|
3118
|
+
const B = t.scenes.get(O.value.name);
|
3118
3119
|
if (B !== void 0) {
|
3119
3120
|
const $ = new B();
|
3120
3121
|
t.onSceneSet !== void 0 && t.onSceneSet($), xe = $, t.three.scene = xe, z.add(xe), on = !0;
|
3121
3122
|
}
|
3122
|
-
}, m = (
|
3123
|
+
}, m = (O) => {
|
3123
3124
|
var F;
|
3124
|
-
const B =
|
3125
|
+
const B = O.value, $ = (F = t.three.scene) == null ? void 0 : F.getObjectByProperty("uuid", B.uuid);
|
3125
3126
|
$ !== void 0 && ne.set(B.name, $), E(Date.now());
|
3126
|
-
}, b = (
|
3127
|
-
ne.delete(
|
3127
|
+
}, b = (O) => {
|
3128
|
+
ne.delete(O.value.name), E(Date.now());
|
3128
3129
|
};
|
3129
3130
|
return _.addEventListener(j.SET_SCENE, d), _.addEventListener(j.ADD_CAMERA, m), _.addEventListener(j.REMOVE_CAMERA, b), () => {
|
3130
3131
|
_.removeEventListener(j.SET_SCENE, d), _.removeEventListener(j.ADD_CAMERA, m), _.removeEventListener(j.REMOVE_CAMERA, b);
|
@@ -3132,24 +3133,24 @@ function pi(t) {
|
|
3132
3133
|
}, []), Fe(() => {
|
3133
3134
|
if (e === null)
|
3134
3135
|
return;
|
3135
|
-
let d = window.innerWidth, m = window.innerHeight, b = Math.floor(d / 2),
|
3136
|
+
let d = window.innerWidth, m = window.innerHeight, b = Math.floor(d / 2), O = Math.floor(m / 2), B = -1;
|
3136
3137
|
const $ = () => {
|
3137
|
-
d = window.innerWidth - 300, m = window.innerHeight, b = Math.floor(d / 2),
|
3138
|
-
let
|
3138
|
+
d = window.innerWidth - 300, m = window.innerHeight, b = Math.floor(d / 2), O = Math.floor(m / 2), e.setSize(d, m);
|
3139
|
+
let R = d, I = m;
|
3139
3140
|
switch (n) {
|
3140
3141
|
case "Side by Side":
|
3141
|
-
|
3142
|
+
R = b, I = m;
|
3142
3143
|
break;
|
3143
3144
|
case "Stacked":
|
3144
|
-
|
3145
|
+
R = d, I = O;
|
3145
3146
|
break;
|
3146
3147
|
case "Quad":
|
3147
|
-
|
3148
|
+
R = b, I = O;
|
3148
3149
|
break;
|
3149
3150
|
}
|
3150
3151
|
ne.forEach((X) => {
|
3151
3152
|
var me;
|
3152
|
-
X instanceof un ? (X.left =
|
3153
|
+
X instanceof un ? (X.left = R / -2, X.right = R / 2, X.top = I / 2, X.bottom = I / -2, X.updateProjectionMatrix()) : X instanceof Dt && (X.aspect = R / I, X.updateProjectionMatrix(), (me = we.get(X.name)) == null || me.update());
|
3153
3154
|
});
|
3154
3155
|
}, F = () => {
|
3155
3156
|
e.setViewport(0, 0, d, m), e.setScissor(0, 0, d, m), e.render(z, V);
|
@@ -3157,15 +3158,15 @@ function pi(t) {
|
|
3157
3158
|
if (n === "Side by Side")
|
3158
3159
|
e.setViewport(0, 0, b, m), e.setScissor(0, 0, b, m), e.render(z, V), e.setViewport(b, 0, b, m), e.setScissor(b, 0, b, m), e.render(z, re);
|
3159
3160
|
else {
|
3160
|
-
const
|
3161
|
-
e.setViewport(0,
|
3161
|
+
const R = m - O;
|
3162
|
+
e.setViewport(0, R, d, O), e.setScissor(0, R, d, O), e.render(z, V), e.setViewport(0, 0, d, O), e.setScissor(0, 0, d, O), e.render(z, re);
|
3162
3163
|
}
|
3163
3164
|
}, U = () => {
|
3164
|
-
let
|
3165
|
-
I = m -
|
3165
|
+
let R = 0, I = 0;
|
3166
|
+
I = m - O, R = 0, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(z, V), R = b, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(z, re), I = 0, R = 0, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(z, Ne), R = b, e.setViewport(R, I, b, O), e.setScissor(R, I, b, O), e.render(z, Le);
|
3166
3167
|
}, J = () => {
|
3167
|
-
switch (ie.forEach((
|
3168
|
-
|
3168
|
+
switch (ie.forEach((R) => {
|
3169
|
+
R.update();
|
3169
3170
|
}), t.onSceneUpdate !== void 0 && on && t.onSceneUpdate(xe), e.clear(), n) {
|
3170
3171
|
case "Single":
|
3171
3172
|
F();
|
@@ -3200,15 +3201,15 @@ function pi(t) {
|
|
3200
3201
|
D < J ? d.setFromCamera(m, V) : d.setFromCamera(m, re);
|
3201
3202
|
break;
|
3202
3203
|
}
|
3203
|
-
},
|
3204
|
+
}, O = (F) => {
|
3204
3205
|
if (!wt)
|
3205
3206
|
return;
|
3206
3207
|
const D = new de();
|
3207
3208
|
e.getSize(D);
|
3208
3209
|
const U = Math.min(F.clientX, D.x), J = Math.min(F.clientY, D.y);
|
3209
3210
|
m.x = Ke(U, 0, D.x, -1, 1), m.y = Ke(J, 0, D.y, 1, -1);
|
3210
|
-
const
|
3211
|
-
U <
|
3211
|
+
const R = D.x / 2, I = D.y / 2, X = () => {
|
3212
|
+
U < R ? m.x = Ke(U, 0, R, -1, 1) : m.x = Ke(U, R, D.x, -1, 1);
|
3212
3213
|
}, me = () => {
|
3213
3214
|
J < I ? m.y = Ke(J, 0, I, 1, -1) : m.y = Ke(J, I, D.y, 1, -1);
|
3214
3215
|
};
|
@@ -3223,7 +3224,7 @@ function pi(t) {
|
|
3223
3224
|
me(), me();
|
3224
3225
|
break;
|
3225
3226
|
}
|
3226
|
-
b(U, J,
|
3227
|
+
b(U, J, R, I);
|
3227
3228
|
const Re = d.intersectObjects(xe.children);
|
3228
3229
|
Re.length > 0 && ot.position.copy(Re[0].point);
|
3229
3230
|
}, B = (F) => {
|
@@ -3232,12 +3233,12 @@ function pi(t) {
|
|
3232
3233
|
const D = new de();
|
3233
3234
|
if (e.getSize(D), F.clientX >= D.x)
|
3234
3235
|
return;
|
3235
|
-
|
3236
|
+
O(F);
|
3236
3237
|
const U = d.intersectObjects(xe.children);
|
3237
3238
|
U.length > 0 && t.three.getObject(U[0].object.uuid);
|
3238
|
-
}, $ =
|
3239
|
-
return $.addEventListener("mousemove",
|
3240
|
-
$.removeEventListener("mousemove",
|
3239
|
+
}, $ = C.current;
|
3240
|
+
return $.addEventListener("mousemove", O, !1), $.addEventListener("click", B, !1), () => {
|
3241
|
+
$.removeEventListener("mousemove", O), $.removeEventListener("click", B);
|
3241
3242
|
};
|
3242
3243
|
}
|
3243
3244
|
}, [n, e]);
|
@@ -3245,52 +3246,52 @@ function pi(t) {
|
|
3245
3246
|
return ne.forEach((d, m) => {
|
3246
3247
|
ee.push(m);
|
3247
3248
|
}), /* @__PURE__ */ c.jsxs("div", { className: "multiview", children: [
|
3248
|
-
/* @__PURE__ */ c.jsx("canvas", { ref:
|
3249
|
-
/* @__PURE__ */ c.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref:
|
3250
|
-
n === "Single" && /* @__PURE__ */ c.jsx(c.Fragment, { children: /* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref:
|
3249
|
+
/* @__PURE__ */ c.jsx("canvas", { ref: x }),
|
3250
|
+
/* @__PURE__ */ c.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: C, children: [
|
3251
|
+
n === "Single" && /* @__PURE__ */ c.jsx(c.Fragment, { children: /* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref: M, onSelect: (d) => {
|
3251
3252
|
var b;
|
3252
3253
|
(b = ie.get(V.name)) == null || b.dispose();
|
3253
3254
|
const m = ne.get(d);
|
3254
|
-
m !== void 0 && (K(V), V = m,
|
3255
|
+
m !== void 0 && (K(V), V = m, S(m, M.current));
|
3255
3256
|
} }) }),
|
3256
3257
|
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
3257
|
-
/* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref:
|
3258
|
+
/* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref: M, onSelect: (d) => {
|
3258
3259
|
var b;
|
3259
3260
|
(b = ie.get(V.name)) == null || b.dispose();
|
3260
3261
|
const m = ne.get(d);
|
3261
|
-
m !== void 0 && (K(V), V = m,
|
3262
|
+
m !== void 0 && (K(V), V = m, S(m, M.current));
|
3262
3263
|
} }),
|
3263
3264
|
/* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: G, onSelect: (d) => {
|
3264
3265
|
var b;
|
3265
3266
|
(b = ie.get(re.name)) == null || b.dispose();
|
3266
3267
|
const m = ne.get(d);
|
3267
|
-
m !== void 0 && (K(re), re = m,
|
3268
|
+
m !== void 0 && (K(re), re = m, S(m, G.current));
|
3268
3269
|
} })
|
3269
3270
|
] }),
|
3270
3271
|
n === "Quad" && /* @__PURE__ */ c.jsxs(c.Fragment, { children: [
|
3271
|
-
/* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref:
|
3272
|
+
/* @__PURE__ */ c.jsx(Ie, { camera: V, options: ee, ref: M, onSelect: (d) => {
|
3272
3273
|
var b;
|
3273
3274
|
(b = ie.get(V.name)) == null || b.dispose();
|
3274
3275
|
const m = ne.get(d);
|
3275
|
-
m !== void 0 && (K(V), V = m,
|
3276
|
+
m !== void 0 && (K(V), V = m, S(m, M.current));
|
3276
3277
|
} }),
|
3277
3278
|
/* @__PURE__ */ c.jsx(Ie, { camera: re, options: ee, ref: G, onSelect: (d) => {
|
3278
3279
|
var b;
|
3279
3280
|
(b = ie.get(re.name)) == null || b.dispose();
|
3280
3281
|
const m = ne.get(d);
|
3281
|
-
m !== void 0 && (K(re), re = m,
|
3282
|
+
m !== void 0 && (K(re), re = m, S(m, G.current));
|
3282
3283
|
} }),
|
3283
3284
|
/* @__PURE__ */ c.jsx(Ie, { camera: Ne, options: ee, ref: se, onSelect: (d) => {
|
3284
3285
|
var b;
|
3285
3286
|
(b = ie.get(Ne.name)) == null || b.dispose();
|
3286
3287
|
const m = ne.get(d);
|
3287
|
-
m !== void 0 && (K(Ne), Ne = m,
|
3288
|
+
m !== void 0 && (K(Ne), Ne = m, S(m, se.current));
|
3288
3289
|
} }),
|
3289
3290
|
/* @__PURE__ */ c.jsx(Ie, { camera: Le, options: ee, ref: H, onSelect: (d) => {
|
3290
3291
|
var b;
|
3291
3292
|
(b = ie.get(Le.name)) == null || b.dispose();
|
3292
3293
|
const m = ne.get(d);
|
3293
|
-
m !== void 0 && (K(Le), Le = m,
|
3294
|
+
m !== void 0 && (K(Le), Le = m, S(m, H.current));
|
3294
3295
|
} })
|
3295
3296
|
] })
|
3296
3297
|
] }),
|