@tomorrowevening/hermes 0.0.11 → 0.0.12
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 +1473 -1277
- package/dist/hermes.umd.cjs +16 -16
- package/dist/style.css +1 -1
- package/package.json +1 -1
- package/src/core/RemoteController.ts +7 -0
- package/src/core/remote/RemoteThree.ts +20 -2
- package/src/core/types.ts +2 -0
- package/src/editor/global.ts +3 -0
- package/src/editor/multiView/CameraWindow.tsx +20 -7
- package/src/editor/multiView/MultiView.scss +2 -0
- package/src/editor/multiView/MultiView.tsx +187 -5
- package/src/editor/scss/{_sceneHierarchy.scss → _sidePanel.scss} +1 -1
- package/src/editor/scss/index.scss +1 -1
- package/src/editor/{sceneHierarchy/SceneHierarchy.tsx → sidePanel/SidePanel.tsx} +8 -10
- package/src/editor/sidePanel/inspector/Inspector.tsx +114 -0
- package/src/editor/sidePanel/inspector/utils/InspectAnimation.tsx +51 -0
- package/src/editor/{sceneHierarchy → sidePanel}/types.ts +10 -1
- package/src/editor/{sceneHierarchy → sidePanel}/utils.ts +11 -2
- package/src/index.ts +6 -6
- package/types/core/remote/RemoteThree.d.ts +3 -1
- package/types/core/types.d.ts +1 -1
- package/types/editor/global.d.ts +2 -0
- package/types/editor/multiView/CameraWindow.d.ts +2 -0
- package/types/editor/sidePanel/SidePanel.d.ts +11 -0
- package/types/editor/sidePanel/inspector/utils/InspectAnimation.d.ts +3 -0
- package/types/editor/{sceneHierarchy → sidePanel}/types.d.ts +7 -1
- package/types/index.d.ts +6 -6
- package/src/editor/sceneHierarchy/inspector/Inspector.tsx +0 -97
- package/types/editor/sceneHierarchy/SceneHierarchy.d.ts +0 -11
- /package/src/editor/{sceneHierarchy → sidePanel}/Accordion.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/ChildObject.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/ContainerObject.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/ToggleBtn.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/InspectorField.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/InspectorGroup.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/SceneInspector.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/inspector.scss +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectCamera.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectLight.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectMaterial.tsx +0 -0
- /package/src/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectTransform.tsx +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/Accordion.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/ChildObject.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/ContainerObject.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/ToggleBtn.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/Inspector.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/InspectorField.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/InspectorGroup.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/SceneInspector.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectCamera.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectLight.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectMaterial.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/inspector/utils/InspectTransform.d.ts +0 -0
- /package/types/editor/{sceneHierarchy → sidePanel}/utils.d.ts +0 -0
package/dist/hermes.js
CHANGED
@@ -1,70 +1,70 @@
|
|
1
|
-
var
|
2
|
-
var
|
3
|
-
var
|
4
|
-
import { PositionalAudio as
|
5
|
-
import { getProject as
|
6
|
-
import { Pane as
|
7
|
-
import * as
|
8
|
-
import
|
9
|
-
import { Reorder as
|
10
|
-
import
|
11
|
-
function
|
1
|
+
var Sn = Object.defineProperty;
|
2
|
+
var On = (t, n, a) => n in t ? Sn(t, n, { enumerable: !0, configurable: !0, writable: !0, value: a }) : t[n] = a;
|
3
|
+
var Z = (t, n, a) => (On(t, typeof n != "symbol" ? n + "" : n, a), a);
|
4
|
+
import { PositionalAudio as Tn, EventDispatcher as nn, Texture as an, CubeTexture as Mn, RepeatWrapping as Gt, ShaderMaterial as rn, GLSL3 as Rn, DoubleSide as Pn, Color as Nt, Mesh as jn, PlaneGeometry as _n, Matrix4 as kn, Vector3 as Y, Euler as An, AnimationMixer as Dn, Ray as In, Plane as Nn, MathUtils as Ln, MOUSE as ze, TOUCH as Ye, Quaternion as Vt, Spherical as zt, Vector2 as ue, PerspectiveCamera as kt, MeshDepthMaterial as Fn, MeshNormalMaterial as Un, MeshBasicMaterial as Bn, OrthographicCamera as on, Scene as sn, Group as $n, AxesHelper as cn, WebGLRenderer as Gn, Raycaster as Vn, CameraHelper as zn } from "three";
|
5
|
+
import { getProject as Yn } from "@theatre/core";
|
6
|
+
import { Pane as Wn } from "tweakpane";
|
7
|
+
import * as Hn from "@tweakpane/plugin-essentials";
|
8
|
+
import ln, { useState as ie, useRef as xe, useEffect as Ne, Component as Kn, forwardRef as Xn } from "react";
|
9
|
+
import { Reorder as un } from "framer-motion";
|
10
|
+
import et from "@theatre/studio";
|
11
|
+
function Ka(t, n, a) {
|
12
12
|
return Math.min(n, Math.max(t, a));
|
13
13
|
}
|
14
|
-
function
|
14
|
+
function Xa(t, n) {
|
15
15
|
const a = t - n;
|
16
16
|
return Math.sqrt(a * a);
|
17
17
|
}
|
18
|
-
function
|
18
|
+
function qn() {
|
19
19
|
return Math.round(Math.random() * 1e6).toString();
|
20
20
|
}
|
21
|
-
function
|
21
|
+
function Zn(t) {
|
22
22
|
return t.r !== void 0 && t.g !== void 0 && t.b !== void 0;
|
23
23
|
}
|
24
|
-
function
|
25
|
-
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255),
|
24
|
+
function Jn(t) {
|
25
|
+
const n = Math.round(t.r * 255), a = Math.round(t.g * 255), e = Math.round(t.b * 255), r = (d) => {
|
26
26
|
const p = d.toString(16);
|
27
27
|
return p.length === 1 ? "0" + p : p;
|
28
|
-
},
|
29
|
-
return "#" +
|
28
|
+
}, s = r(n), c = r(a), l = r(e);
|
29
|
+
return "#" + s + c + l;
|
30
30
|
}
|
31
|
-
function
|
31
|
+
function Rt(t, n = 1) {
|
32
32
|
return Number(t.toFixed(n));
|
33
33
|
}
|
34
|
-
let
|
35
|
-
const
|
36
|
-
|
37
|
-
},
|
34
|
+
let At = 0;
|
35
|
+
const Qn = () => {
|
36
|
+
At = 0;
|
37
|
+
}, dn = (t) => {
|
38
38
|
if (!t)
|
39
39
|
return;
|
40
40
|
let n = t.name.replace(" ", "");
|
41
|
-
n.length === 0 && (n = `obj_${
|
42
|
-
|
41
|
+
n.length === 0 && (n = `obj_${At}`, At++), t.parent !== null && (n = `${t.parent.uuid}.${n}`), t.uuid = n, t.children.forEach((a) => {
|
42
|
+
dn(a);
|
43
43
|
});
|
44
|
-
},
|
44
|
+
}, qa = (t) => {
|
45
45
|
t == null || t.dispose();
|
46
|
-
},
|
46
|
+
}, ea = (t) => {
|
47
47
|
t && (Array.isArray(t) ? t.forEach((n) => n.dispose()) : t.dispose());
|
48
|
-
},
|
48
|
+
}, fn = (t) => {
|
49
49
|
var n;
|
50
50
|
if (t) {
|
51
51
|
for (; t.children.length > 0; ) {
|
52
52
|
const a = t.children[0];
|
53
|
-
a instanceof
|
53
|
+
a instanceof Tn ? (a.pause(), a.parent && a.parent.remove(a)) : fn(a);
|
54
54
|
}
|
55
55
|
if (t.parent && t.parent.remove(t), t.isMesh) {
|
56
56
|
const a = t;
|
57
|
-
(n = a.geometry) == null || n.dispose(),
|
57
|
+
(n = a.geometry) == null || n.dispose(), ea(a.material);
|
58
58
|
}
|
59
59
|
t.dispose !== void 0 && t.dispose();
|
60
60
|
}
|
61
61
|
};
|
62
|
-
class
|
62
|
+
class Za {
|
63
63
|
constructor(n, a, e) {
|
64
|
-
|
65
|
-
|
64
|
+
Z(this, "channel");
|
65
|
+
Z(this, "components", /* @__PURE__ */ new Map());
|
66
66
|
// Protected
|
67
|
-
|
67
|
+
Z(this, "_mode", "app");
|
68
68
|
this.editor = a && document.location.hash.search(e) > -1, a && (this.channel = new BroadcastChannel(n));
|
69
69
|
}
|
70
70
|
addComponent(n, a) {
|
@@ -95,7 +95,7 @@ class Va {
|
|
95
95
|
n && (this._mode = "editor", document.title += " - Editor");
|
96
96
|
}
|
97
97
|
}
|
98
|
-
const
|
98
|
+
const k = new nn(), A = {
|
99
99
|
CUSTOM: "ToolEvents::custom",
|
100
100
|
// Components
|
101
101
|
SELECT_DROPDOWN: "ToolEvents::selectDropdown",
|
@@ -106,17 +106,20 @@ const I = new Zt(), N = {
|
|
106
106
|
SET_OBJECT: "ToolEvents::setObject",
|
107
107
|
UPDATE_OBJECT: "ToolEvents::updateObject",
|
108
108
|
CREATE_TEXTURE: "ToolEvents::createTexture",
|
109
|
-
REQUEST_METHOD: "ToolEvents::requestMethod"
|
109
|
+
REQUEST_METHOD: "ToolEvents::requestMethod",
|
110
|
+
// MultiView
|
111
|
+
ADD_CAMERA: "ToolEvents::addCamera",
|
112
|
+
REMOVE_CAMERA: "ToolEvents::removeCamera"
|
110
113
|
};
|
111
|
-
class
|
114
|
+
class xt {
|
112
115
|
constructor(n) {
|
113
|
-
|
116
|
+
Z(this, "app");
|
114
117
|
this.app = n;
|
115
118
|
}
|
116
119
|
dispose() {
|
117
120
|
}
|
118
121
|
}
|
119
|
-
class
|
122
|
+
class Ja extends xt {
|
120
123
|
selectDropdown(n, a) {
|
121
124
|
this.app.send({
|
122
125
|
event: "selectComponent",
|
@@ -138,31 +141,31 @@ class Ya extends gt {
|
|
138
141
|
});
|
139
142
|
}
|
140
143
|
}
|
141
|
-
const
|
144
|
+
const hn = () => {
|
142
145
|
};
|
143
|
-
class
|
144
|
-
constructor(a, e,
|
146
|
+
class Qa extends xt {
|
147
|
+
constructor(a, e, r) {
|
145
148
|
super(a);
|
146
|
-
|
147
|
-
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
this.project =
|
149
|
+
Z(this, "project");
|
150
|
+
Z(this, "sheets");
|
151
|
+
Z(this, "sheetObjects");
|
152
|
+
Z(this, "sheetObjectCBs");
|
153
|
+
Z(this, "sheetObjectUnsubscribe");
|
154
|
+
this.project = Yn(e, r), this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
152
155
|
}
|
153
156
|
dispose() {
|
154
157
|
this.project = void 0, this.sheets = /* @__PURE__ */ new Map(), this.sheetObjects = /* @__PURE__ */ new Map(), this.sheetObjectCBs = /* @__PURE__ */ new Map(), this.sheetObjectUnsubscribe = /* @__PURE__ */ new Map();
|
155
158
|
}
|
156
159
|
sheet(a) {
|
157
|
-
var
|
160
|
+
var r;
|
158
161
|
if (this.project === void 0) {
|
159
162
|
console.error("Theatre Project hasn't been created yet.");
|
160
163
|
return;
|
161
164
|
}
|
162
165
|
let e = this.sheets.get(a);
|
163
|
-
return e !== void 0 || (e = (
|
166
|
+
return e !== void 0 || (e = (r = this.project) == null ? void 0 : r.sheet(a), this.sheets.set(a, e)), e;
|
164
167
|
}
|
165
|
-
sheetObject(a, e,
|
168
|
+
sheetObject(a, e, r, s) {
|
166
169
|
if (this.project === void 0) {
|
167
170
|
console.error("Theatre Project hasn't been created yet.");
|
168
171
|
return;
|
@@ -170,16 +173,16 @@ class za extends gt {
|
|
170
173
|
const c = this.sheets.get(a);
|
171
174
|
if (c === void 0)
|
172
175
|
return;
|
173
|
-
const
|
174
|
-
let d = this.sheetObjects.get(
|
176
|
+
const l = `${a}_${e}`;
|
177
|
+
let d = this.sheetObjects.get(l);
|
175
178
|
if (d !== void 0)
|
176
|
-
return d = c.object(e, { ...
|
177
|
-
d = c.object(e,
|
178
|
-
const p = d.onValuesChange((
|
179
|
+
return d = c.object(e, { ...r, ...d.value }, { reconfigure: !0 }), d;
|
180
|
+
d = c.object(e, r), this.sheetObjects.set(l, d), this.sheetObjectCBs.set(l, s !== void 0 ? s : hn);
|
181
|
+
const p = d.onValuesChange((m) => {
|
179
182
|
if (this.app.editor) {
|
180
|
-
for (const b in
|
181
|
-
const x =
|
182
|
-
typeof x == "object" &&
|
183
|
+
for (const b in m) {
|
184
|
+
const x = m[b];
|
185
|
+
typeof x == "object" && Zn(x) && (m[b] = {
|
183
186
|
r: x.r,
|
184
187
|
g: x.g,
|
185
188
|
b: x.b,
|
@@ -190,27 +193,27 @@ class za extends gt {
|
|
190
193
|
event: "updateSheetObject",
|
191
194
|
target: "app",
|
192
195
|
data: {
|
193
|
-
sheetObject:
|
194
|
-
values:
|
196
|
+
sheetObject: l,
|
197
|
+
values: m
|
195
198
|
}
|
196
199
|
});
|
197
200
|
} else {
|
198
|
-
const b = this.sheetObjectCBs.get(
|
199
|
-
b !== void 0 && b(
|
201
|
+
const b = this.sheetObjectCBs.get(l);
|
202
|
+
b !== void 0 && b(m);
|
200
203
|
}
|
201
204
|
});
|
202
|
-
return this.sheetObjectUnsubscribe.set(
|
205
|
+
return this.sheetObjectUnsubscribe.set(l, p), d;
|
203
206
|
}
|
204
207
|
unsubscribe(a) {
|
205
208
|
if (this.project === void 0) {
|
206
209
|
console.error("Theatre Project hasn't been created yet.");
|
207
210
|
return;
|
208
211
|
}
|
209
|
-
const e = `${a.address.sheetId}_${a.address.objectKey}`,
|
210
|
-
|
212
|
+
const e = `${a.address.sheetId}_${a.address.objectKey}`, r = this.sheetObjectUnsubscribe.get(e);
|
213
|
+
r !== void 0 && r();
|
211
214
|
}
|
212
215
|
}
|
213
|
-
function
|
216
|
+
function ta(t) {
|
214
217
|
if (t.name === "cameras")
|
215
218
|
return "camera";
|
216
219
|
if (t.name === "interactive")
|
@@ -224,7 +227,7 @@ function Hn(t) {
|
|
224
227
|
const n = t.type;
|
225
228
|
return n.search("Helper") > -1 ? "icon_utils" : n.search("Camera") > -1 ? "camera" : n.search("Light") > -1 ? "light" : "obj3D";
|
226
229
|
}
|
227
|
-
function
|
230
|
+
function pn(t) {
|
228
231
|
const n = {
|
229
232
|
name: t.name,
|
230
233
|
type: t.type,
|
@@ -232,10 +235,10 @@ function cn(t) {
|
|
232
235
|
children: []
|
233
236
|
};
|
234
237
|
return t.children.forEach((a) => {
|
235
|
-
n.children.push(
|
238
|
+
n.children.push(pn(a));
|
236
239
|
}), n;
|
237
240
|
}
|
238
|
-
function
|
241
|
+
function na(t) {
|
239
242
|
const n = {};
|
240
243
|
for (const a in t) {
|
241
244
|
const e = t[a].value;
|
@@ -243,7 +246,7 @@ function Kn(t) {
|
|
243
246
|
}
|
244
247
|
return n;
|
245
248
|
}
|
246
|
-
function
|
249
|
+
function aa(t) {
|
247
250
|
switch (t) {
|
248
251
|
case "blendSrcAlpha":
|
249
252
|
case "blendDstAlpha":
|
@@ -255,28 +258,28 @@ function Xn(t) {
|
|
255
258
|
}
|
256
259
|
return !1;
|
257
260
|
}
|
258
|
-
function
|
261
|
+
function Yt(t) {
|
259
262
|
const n = {};
|
260
263
|
for (const a in t) {
|
261
|
-
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" ||
|
264
|
+
if (a.substring(0, 1) === "_" || a.substring(0, 2) === "is" || aa(a))
|
262
265
|
continue;
|
263
|
-
const e = typeof t[a],
|
266
|
+
const e = typeof t[a], r = t[a];
|
264
267
|
switch (e) {
|
265
268
|
case "boolean":
|
266
269
|
case "number":
|
267
270
|
case "string":
|
268
|
-
n[a] =
|
271
|
+
n[a] = r;
|
269
272
|
break;
|
270
273
|
case "object":
|
271
|
-
if (
|
272
|
-
if (n[a] =
|
273
|
-
if (
|
274
|
-
const
|
275
|
-
n[a] = { src:
|
274
|
+
if (r !== null)
|
275
|
+
if (n[a] = r, r.isTexture)
|
276
|
+
if (r instanceof an) {
|
277
|
+
const s = r.source.toJSON();
|
278
|
+
n[a] = { src: s.url };
|
276
279
|
} else
|
277
|
-
|
280
|
+
r instanceof Mn && (console.log("env map"), console.log(r.source.data), console.log(r.source.toJSON()), n[a] = { src: "" });
|
278
281
|
else
|
279
|
-
a === "uniforms" && (n[a] =
|
282
|
+
a === "uniforms" && (n[a] = na(n[a]));
|
280
283
|
else
|
281
284
|
n[a] = { src: "" };
|
282
285
|
break;
|
@@ -284,7 +287,7 @@ function Bt(t) {
|
|
284
287
|
}
|
285
288
|
return n;
|
286
289
|
}
|
287
|
-
function
|
290
|
+
function Pt(t) {
|
288
291
|
t.updateMatrix();
|
289
292
|
const n = {
|
290
293
|
name: t.name,
|
@@ -292,20 +295,29 @@ function qn(t) {
|
|
292
295
|
uuid: t.uuid,
|
293
296
|
visible: t.visible,
|
294
297
|
matrix: t.matrix.elements,
|
298
|
+
animations: [],
|
295
299
|
material: void 0,
|
296
300
|
perspectiveCameraInfo: void 0,
|
297
301
|
orthographicCameraInfo: void 0,
|
298
302
|
lightInfo: void 0
|
299
|
-
}
|
303
|
+
};
|
304
|
+
t.animations.forEach((e) => {
|
305
|
+
n.animations.push({
|
306
|
+
name: e.name,
|
307
|
+
duration: e.duration,
|
308
|
+
blendMode: e.blendMode
|
309
|
+
});
|
310
|
+
});
|
311
|
+
const a = t.type.toLowerCase();
|
300
312
|
if (a.search("mesh") > -1) {
|
301
313
|
const e = t;
|
302
314
|
if (Array.isArray(e.material)) {
|
303
|
-
const
|
304
|
-
e.material.forEach((
|
305
|
-
|
306
|
-
}), n.material =
|
315
|
+
const r = [];
|
316
|
+
e.material.forEach((s) => {
|
317
|
+
r.push(Yt(s));
|
318
|
+
}), n.material = r;
|
307
319
|
} else
|
308
|
-
n.material =
|
320
|
+
n.material = Yt(e.material);
|
309
321
|
} else
|
310
322
|
a.search("camera") > -1 ? t.type === "PerspectiveCamera" ? n.perspectiveCameraInfo = {
|
311
323
|
fov: t.fov,
|
@@ -335,7 +347,7 @@ function qn(t) {
|
|
335
347
|
});
|
336
348
|
return n;
|
337
349
|
}
|
338
|
-
function
|
350
|
+
function ee(t, n, a) {
|
339
351
|
const e = n.split(".");
|
340
352
|
switch (e.length) {
|
341
353
|
case 1:
|
@@ -355,19 +367,19 @@ function q(t, n, a) {
|
|
355
367
|
break;
|
356
368
|
}
|
357
369
|
}
|
358
|
-
function
|
370
|
+
function Dt(t) {
|
359
371
|
return new Promise((n, a) => {
|
360
372
|
const e = new Image();
|
361
373
|
e.onload = () => {
|
362
|
-
const
|
363
|
-
|
374
|
+
const r = new an(e);
|
375
|
+
r.wrapS = Gt, r.wrapT = Gt, r.needsUpdate = !0, n(r);
|
364
376
|
}, e.onerror = a, e.src = t;
|
365
377
|
});
|
366
378
|
}
|
367
|
-
class
|
379
|
+
class ei extends xt {
|
368
380
|
constructor() {
|
369
381
|
super(...arguments);
|
370
|
-
|
382
|
+
Z(this, "scene");
|
371
383
|
}
|
372
384
|
getObject(a) {
|
373
385
|
this.app.send({
|
@@ -377,79 +389,95 @@ class Wa extends gt {
|
|
377
389
|
});
|
378
390
|
}
|
379
391
|
setObject(a) {
|
380
|
-
const e =
|
392
|
+
const e = Pt(a);
|
381
393
|
this.app.send({
|
382
394
|
event: "setObject",
|
383
395
|
target: "editor",
|
384
396
|
data: e
|
385
397
|
});
|
386
398
|
}
|
387
|
-
requestMethod(a, e,
|
399
|
+
requestMethod(a, e, r) {
|
388
400
|
this.app.send({
|
389
401
|
event: "requestMethod",
|
390
402
|
target: "app",
|
391
403
|
data: {
|
392
404
|
uuid: a,
|
393
405
|
key: e,
|
394
|
-
value:
|
406
|
+
value: r
|
395
407
|
}
|
396
408
|
});
|
397
409
|
}
|
398
|
-
updateObject(a, e,
|
410
|
+
updateObject(a, e, r) {
|
399
411
|
this.app.send({
|
400
412
|
event: "updateObject",
|
401
413
|
target: "app",
|
402
414
|
data: {
|
403
415
|
uuid: a,
|
404
416
|
key: e,
|
405
|
-
value:
|
417
|
+
value: r
|
406
418
|
}
|
407
419
|
});
|
408
420
|
}
|
409
|
-
createTexture(a, e,
|
421
|
+
createTexture(a, e, r) {
|
410
422
|
this.app.send({
|
411
423
|
event: "createTexture",
|
412
424
|
target: "app",
|
413
425
|
data: {
|
414
426
|
uuid: a,
|
415
427
|
key: e,
|
416
|
-
value:
|
428
|
+
value: r
|
417
429
|
}
|
418
430
|
});
|
419
431
|
}
|
420
432
|
setScene(a) {
|
421
433
|
if (a === void 0)
|
422
434
|
return;
|
423
|
-
this.scene = a,
|
424
|
-
const e =
|
435
|
+
this.scene = a, Qn(), dn(this.scene);
|
436
|
+
const e = pn(this.scene);
|
425
437
|
this.app.send({
|
426
438
|
event: "setScene",
|
427
439
|
target: "editor",
|
428
440
|
data: e
|
429
441
|
});
|
430
442
|
}
|
443
|
+
addCamera(a) {
|
444
|
+
const e = Pt(a);
|
445
|
+
this.app.send({
|
446
|
+
event: "addCamera",
|
447
|
+
target: "editor",
|
448
|
+
data: e
|
449
|
+
});
|
450
|
+
}
|
451
|
+
removeCamera(a) {
|
452
|
+
const e = Pt(a);
|
453
|
+
this.app.send({
|
454
|
+
event: "removeCamera",
|
455
|
+
target: "editor",
|
456
|
+
data: e
|
457
|
+
});
|
458
|
+
}
|
431
459
|
}
|
432
|
-
class
|
460
|
+
class ti extends xt {
|
433
461
|
constructor(a) {
|
434
462
|
super(a);
|
435
|
-
|
436
|
-
|
437
|
-
|
438
|
-
|
439
|
-
|
440
|
-
|
463
|
+
Z(this, "bindCBs");
|
464
|
+
Z(this, "buttonCBs");
|
465
|
+
Z(this, "pane");
|
466
|
+
Z(this, "appCallbacks", 0);
|
467
|
+
Z(this, "editorCallbacks", 0);
|
468
|
+
Z(this, "inspectorFolder");
|
441
469
|
this.bindCBs = /* @__PURE__ */ new Map(), this.buttonCBs = /* @__PURE__ */ new Map(), a.editor && this.createGUI();
|
442
470
|
}
|
443
471
|
createGUI() {
|
444
|
-
this.pane = new
|
472
|
+
this.pane = new Wn({ title: "GUI" }), this.pane.registerPlugin(Hn);
|
445
473
|
}
|
446
474
|
dispose() {
|
447
475
|
var a;
|
448
476
|
this.bindCBs.clear(), this.buttonCBs.clear(), this.appCallbacks = 0, this.editorCallbacks = 0, this.app.editor && ((a = this.pane) == null || a.dispose(), this.pane = void 0);
|
449
477
|
}
|
450
|
-
addFolder(a, e = void 0,
|
478
|
+
addFolder(a, e = void 0, r = void 0) {
|
451
479
|
if (this.app.editor)
|
452
|
-
return this.pane === void 0 && this.createGUI(), (
|
480
|
+
return this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addFolder({
|
453
481
|
title: a,
|
454
482
|
...e
|
455
483
|
});
|
@@ -459,7 +487,7 @@ class Ha extends gt {
|
|
459
487
|
data: {
|
460
488
|
name: a,
|
461
489
|
params: e,
|
462
|
-
parent:
|
490
|
+
parent: r
|
463
491
|
}
|
464
492
|
});
|
465
493
|
}
|
@@ -467,9 +495,9 @@ class Ha extends gt {
|
|
467
495
|
return `debug_${Math.max(this.appCallbacks, this.editorCallbacks)}`;
|
468
496
|
}
|
469
497
|
// Binding
|
470
|
-
bind(a, e,
|
471
|
-
const c = this.bindID,
|
472
|
-
this.bindCBs.set(c,
|
498
|
+
bind(a, e, r, s = void 0) {
|
499
|
+
const c = this.bindID, l = r.onChange !== void 0 ? r.onChange : hn;
|
500
|
+
this.bindCBs.set(c, l), this.app.editor ? (this.pane === void 0 && this.createGUI(), (s !== void 0 ? s : this.pane).addBinding(a, e, r).on("change", (p) => {
|
473
501
|
this.app.send({
|
474
502
|
event: "updateBind",
|
475
503
|
target: "app",
|
@@ -484,34 +512,34 @@ class Ha extends gt {
|
|
484
512
|
data: {
|
485
513
|
id: c,
|
486
514
|
name: e,
|
487
|
-
params:
|
488
|
-
parent:
|
515
|
+
params: r,
|
516
|
+
parent: s
|
489
517
|
}
|
490
518
|
}), this.appCallbacks++);
|
491
519
|
}
|
492
520
|
triggerBind(a, e) {
|
493
|
-
const
|
494
|
-
|
521
|
+
const r = this.bindCBs.get(a);
|
522
|
+
r !== void 0 ? r(e) : console.warn(`No callback for: ${a}`, e);
|
495
523
|
}
|
496
524
|
// Buttons
|
497
|
-
button(a, e,
|
498
|
-
const
|
499
|
-
this.buttonCBs.set(
|
525
|
+
button(a, e, r = void 0) {
|
526
|
+
const s = this.bindID;
|
527
|
+
this.buttonCBs.set(s, e), this.app.editor ? (this.pane === void 0 && this.createGUI(), (r !== void 0 ? r : this.pane).addButton({ title: a }).on("click", () => {
|
500
528
|
this.app.send({
|
501
529
|
event: "clickButton",
|
502
530
|
target: "app",
|
503
531
|
data: {
|
504
|
-
id:
|
532
|
+
id: s
|
505
533
|
}
|
506
534
|
});
|
507
535
|
}), this.editorCallbacks++) : (this.app.send({
|
508
536
|
event: "addButton",
|
509
537
|
target: "app",
|
510
538
|
data: {
|
511
|
-
id:
|
539
|
+
id: s,
|
512
540
|
name: a,
|
513
541
|
callback: e,
|
514
|
-
parent:
|
542
|
+
parent: r
|
515
543
|
}
|
516
544
|
}), this.appCallbacks++);
|
517
545
|
}
|
@@ -529,7 +557,7 @@ class Ha extends gt {
|
|
529
557
|
this.inspectorFolder.remove(this.inspectorFolder.children[e]);
|
530
558
|
}
|
531
559
|
}
|
532
|
-
var
|
560
|
+
var It = { exports: {} }, tt = {};
|
533
561
|
/**
|
534
562
|
* @license React
|
535
563
|
* react-jsx-runtime.production.min.js
|
@@ -539,25 +567,25 @@ var Pt = { exports: {} }, Je = {};
|
|
539
567
|
* This source code is licensed under the MIT license found in the
|
540
568
|
* LICENSE file in the root directory of this source tree.
|
541
569
|
*/
|
542
|
-
var
|
543
|
-
function
|
544
|
-
if (
|
545
|
-
return
|
546
|
-
|
547
|
-
var t =
|
548
|
-
function c(
|
549
|
-
var
|
550
|
-
p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (
|
551
|
-
for (
|
552
|
-
e.call(d,
|
553
|
-
if (
|
554
|
-
for (
|
555
|
-
b[
|
556
|
-
return { $$typeof: n, type:
|
557
|
-
}
|
558
|
-
return
|
570
|
+
var Wt;
|
571
|
+
function ia() {
|
572
|
+
if (Wt)
|
573
|
+
return tt;
|
574
|
+
Wt = 1;
|
575
|
+
var t = ln, 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 };
|
576
|
+
function c(l, d, p) {
|
577
|
+
var m, b = {}, x = null, C = null;
|
578
|
+
p !== void 0 && (x = "" + p), d.key !== void 0 && (x = "" + d.key), d.ref !== void 0 && (C = d.ref);
|
579
|
+
for (m in d)
|
580
|
+
e.call(d, m) && !s.hasOwnProperty(m) && (b[m] = d[m]);
|
581
|
+
if (l && l.defaultProps)
|
582
|
+
for (m in d = l.defaultProps, d)
|
583
|
+
b[m] === void 0 && (b[m] = d[m]);
|
584
|
+
return { $$typeof: n, type: l, key: x, ref: C, props: b, _owner: r.current };
|
585
|
+
}
|
586
|
+
return tt.Fragment = a, tt.jsx = c, tt.jsxs = c, tt;
|
559
587
|
}
|
560
|
-
var
|
588
|
+
var nt = {};
|
561
589
|
/**
|
562
590
|
* @license React
|
563
591
|
* react-jsx-runtime.development.js
|
@@ -567,91 +595,91 @@ var Qe = {};
|
|
567
595
|
* This source code is licensed under the MIT license found in the
|
568
596
|
* LICENSE file in the root directory of this source tree.
|
569
597
|
*/
|
570
|
-
var
|
571
|
-
function
|
572
|
-
return
|
573
|
-
var t =
|
574
|
-
function
|
575
|
-
if (
|
598
|
+
var Ht;
|
599
|
+
function ra() {
|
600
|
+
return Ht || (Ht = 1, process.env.NODE_ENV !== "production" && function() {
|
601
|
+
var t = ln, 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"), c = Symbol.for("react.provider"), l = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), p = Symbol.for("react.suspense"), m = Symbol.for("react.suspense_list"), b = Symbol.for("react.memo"), x = Symbol.for("react.lazy"), C = Symbol.for("react.offscreen"), S = Symbol.iterator, F = "@@iterator";
|
602
|
+
function Q(i) {
|
603
|
+
if (i === null || typeof i != "object")
|
576
604
|
return null;
|
577
|
-
var
|
578
|
-
return typeof
|
605
|
+
var h = S && i[S] || i[F];
|
606
|
+
return typeof h == "function" ? h : null;
|
579
607
|
}
|
580
|
-
var
|
581
|
-
function
|
608
|
+
var H = t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;
|
609
|
+
function O(i) {
|
582
610
|
{
|
583
|
-
for (var
|
584
|
-
|
585
|
-
|
611
|
+
for (var h = arguments.length, v = new Array(h > 1 ? h - 1 : 0), w = 1; w < h; w++)
|
612
|
+
v[w - 1] = arguments[w];
|
613
|
+
K("error", i, v);
|
586
614
|
}
|
587
615
|
}
|
588
|
-
function
|
616
|
+
function K(i, h, v) {
|
589
617
|
{
|
590
|
-
var
|
591
|
-
|
592
|
-
var
|
593
|
-
return String(
|
618
|
+
var w = H.ReactDebugCurrentFrame, j = w.getStackAddendum();
|
619
|
+
j !== "" && (h += "%s", v = v.concat([j]));
|
620
|
+
var L = v.map(function(P) {
|
621
|
+
return String(P);
|
594
622
|
});
|
595
|
-
|
623
|
+
L.unshift("Warning: " + h), Function.prototype.apply.call(console[i], console, L);
|
596
624
|
}
|
597
625
|
}
|
598
|
-
var
|
599
|
-
|
600
|
-
function
|
601
|
-
return !!(typeof
|
626
|
+
var de = !1, ce = !1, te = !1, f = !1, g = !1, y;
|
627
|
+
y = Symbol.for("react.module.reference");
|
628
|
+
function T(i) {
|
629
|
+
return !!(typeof i == "string" || typeof i == "function" || i === e || i === s || g || i === r || i === p || i === m || f || i === C || de || ce || te || typeof i == "object" && i !== null && (i.$$typeof === x || i.$$typeof === b || i.$$typeof === c || i.$$typeof === l || i.$$typeof === d || // This needs to include all possible module reference object
|
602
630
|
// types supported by any Flight configuration anywhere since
|
603
631
|
// we don't know which Flight build this will end up being used
|
604
632
|
// with.
|
605
|
-
|
633
|
+
i.$$typeof === y || i.getModuleId !== void 0));
|
606
634
|
}
|
607
|
-
function
|
608
|
-
var
|
609
|
-
if (
|
610
|
-
return
|
611
|
-
var
|
612
|
-
return
|
635
|
+
function V(i, h, v) {
|
636
|
+
var w = i.displayName;
|
637
|
+
if (w)
|
638
|
+
return w;
|
639
|
+
var j = h.displayName || h.name || "";
|
640
|
+
return j !== "" ? v + "(" + j + ")" : v;
|
613
641
|
}
|
614
|
-
function
|
615
|
-
return
|
642
|
+
function z(i) {
|
643
|
+
return i.displayName || "Context";
|
616
644
|
}
|
617
|
-
function
|
618
|
-
if (
|
645
|
+
function U(i) {
|
646
|
+
if (i == null)
|
619
647
|
return null;
|
620
|
-
if (typeof
|
621
|
-
return
|
622
|
-
if (typeof
|
623
|
-
return
|
624
|
-
switch (
|
648
|
+
if (typeof i.tag == "number" && O("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."), typeof i == "function")
|
649
|
+
return i.displayName || i.name || null;
|
650
|
+
if (typeof i == "string")
|
651
|
+
return i;
|
652
|
+
switch (i) {
|
625
653
|
case e:
|
626
654
|
return "Fragment";
|
627
655
|
case a:
|
628
656
|
return "Portal";
|
629
|
-
case
|
657
|
+
case s:
|
630
658
|
return "Profiler";
|
631
|
-
case
|
659
|
+
case r:
|
632
660
|
return "StrictMode";
|
633
661
|
case p:
|
634
662
|
return "Suspense";
|
635
|
-
case
|
663
|
+
case m:
|
636
664
|
return "SuspenseList";
|
637
665
|
}
|
638
|
-
if (typeof
|
639
|
-
switch (
|
640
|
-
case
|
641
|
-
var
|
642
|
-
return
|
666
|
+
if (typeof i == "object")
|
667
|
+
switch (i.$$typeof) {
|
668
|
+
case l:
|
669
|
+
var h = i;
|
670
|
+
return z(h) + ".Consumer";
|
643
671
|
case c:
|
644
|
-
var
|
645
|
-
return
|
672
|
+
var v = i;
|
673
|
+
return z(v._context) + ".Provider";
|
646
674
|
case d:
|
647
|
-
return
|
675
|
+
return V(i, i.render, "ForwardRef");
|
648
676
|
case b:
|
649
|
-
var
|
650
|
-
return
|
677
|
+
var w = i.displayName || null;
|
678
|
+
return w !== null ? w : U(i.type) || "Memo";
|
651
679
|
case x: {
|
652
|
-
var
|
680
|
+
var j = i, L = j._payload, P = j._init;
|
653
681
|
try {
|
654
|
-
return
|
682
|
+
return U(P(L));
|
655
683
|
} catch {
|
656
684
|
return null;
|
657
685
|
}
|
@@ -659,511 +687,511 @@ function Jn() {
|
|
659
687
|
}
|
660
688
|
return null;
|
661
689
|
}
|
662
|
-
var
|
663
|
-
function
|
690
|
+
var D = Object.assign, B = 0, J, R, I, X, pe, Oe, He;
|
691
|
+
function ot() {
|
664
692
|
}
|
665
|
-
|
666
|
-
function
|
693
|
+
ot.__reactDisabledLog = !0;
|
694
|
+
function Ct() {
|
667
695
|
{
|
668
|
-
if (
|
669
|
-
|
670
|
-
var
|
696
|
+
if (B === 0) {
|
697
|
+
J = console.log, R = console.info, I = console.warn, X = console.error, pe = console.group, Oe = console.groupCollapsed, He = console.groupEnd;
|
698
|
+
var i = {
|
671
699
|
configurable: !0,
|
672
700
|
enumerable: !0,
|
673
|
-
value:
|
701
|
+
value: ot,
|
674
702
|
writable: !0
|
675
703
|
};
|
676
704
|
Object.defineProperties(console, {
|
677
|
-
info:
|
678
|
-
log:
|
679
|
-
warn:
|
680
|
-
error:
|
681
|
-
group:
|
682
|
-
groupCollapsed:
|
683
|
-
groupEnd:
|
705
|
+
info: i,
|
706
|
+
log: i,
|
707
|
+
warn: i,
|
708
|
+
error: i,
|
709
|
+
group: i,
|
710
|
+
groupCollapsed: i,
|
711
|
+
groupEnd: i
|
684
712
|
});
|
685
713
|
}
|
686
|
-
|
714
|
+
B++;
|
687
715
|
}
|
688
716
|
}
|
689
|
-
function
|
717
|
+
function St() {
|
690
718
|
{
|
691
|
-
if (
|
692
|
-
var
|
719
|
+
if (B--, B === 0) {
|
720
|
+
var i = {
|
693
721
|
configurable: !0,
|
694
722
|
enumerable: !0,
|
695
723
|
writable: !0
|
696
724
|
};
|
697
725
|
Object.defineProperties(console, {
|
698
|
-
log:
|
699
|
-
value:
|
726
|
+
log: D({}, i, {
|
727
|
+
value: J
|
700
728
|
}),
|
701
|
-
info:
|
702
|
-
value:
|
729
|
+
info: D({}, i, {
|
730
|
+
value: R
|
703
731
|
}),
|
704
|
-
warn:
|
705
|
-
value:
|
732
|
+
warn: D({}, i, {
|
733
|
+
value: I
|
706
734
|
}),
|
707
|
-
error:
|
708
|
-
value:
|
735
|
+
error: D({}, i, {
|
736
|
+
value: X
|
709
737
|
}),
|
710
|
-
group:
|
711
|
-
value:
|
738
|
+
group: D({}, i, {
|
739
|
+
value: pe
|
712
740
|
}),
|
713
|
-
groupCollapsed:
|
714
|
-
value:
|
741
|
+
groupCollapsed: D({}, i, {
|
742
|
+
value: Oe
|
715
743
|
}),
|
716
|
-
groupEnd:
|
717
|
-
value:
|
744
|
+
groupEnd: D({}, i, {
|
745
|
+
value: He
|
718
746
|
})
|
719
747
|
});
|
720
748
|
}
|
721
|
-
|
749
|
+
B < 0 && O("disabledDepth fell below zero. This is a bug in React. Please file an issue.");
|
722
750
|
}
|
723
751
|
}
|
724
|
-
var
|
725
|
-
function
|
752
|
+
var Ke = H.ReactCurrentDispatcher, Xe;
|
753
|
+
function Te(i, h, v) {
|
726
754
|
{
|
727
|
-
if (
|
755
|
+
if (Xe === void 0)
|
728
756
|
try {
|
729
757
|
throw Error();
|
730
|
-
} catch (
|
731
|
-
var
|
732
|
-
|
758
|
+
} catch (j) {
|
759
|
+
var w = j.stack.trim().match(/\n( *(at )?)/);
|
760
|
+
Xe = w && w[1] || "";
|
733
761
|
}
|
734
762
|
return `
|
735
|
-
` +
|
763
|
+
` + Xe + i;
|
736
764
|
}
|
737
765
|
}
|
738
|
-
var
|
766
|
+
var Ue = !1, Me;
|
739
767
|
{
|
740
|
-
var
|
741
|
-
|
768
|
+
var Ot = typeof WeakMap == "function" ? WeakMap : Map;
|
769
|
+
Me = new Ot();
|
742
770
|
}
|
743
|
-
function
|
744
|
-
if (!
|
771
|
+
function st(i, h) {
|
772
|
+
if (!i || Ue)
|
745
773
|
return "";
|
746
774
|
{
|
747
|
-
var
|
748
|
-
if (
|
749
|
-
return
|
775
|
+
var v = Me.get(i);
|
776
|
+
if (v !== void 0)
|
777
|
+
return v;
|
750
778
|
}
|
751
|
-
var
|
752
|
-
|
753
|
-
var
|
779
|
+
var w;
|
780
|
+
Ue = !0;
|
781
|
+
var j = Error.prepareStackTrace;
|
754
782
|
Error.prepareStackTrace = void 0;
|
755
|
-
var
|
756
|
-
|
783
|
+
var L;
|
784
|
+
L = Ke.current, Ke.current = null, Ct();
|
757
785
|
try {
|
758
|
-
if (
|
759
|
-
var
|
786
|
+
if (h) {
|
787
|
+
var P = function() {
|
760
788
|
throw Error();
|
761
789
|
};
|
762
|
-
if (Object.defineProperty(
|
790
|
+
if (Object.defineProperty(P.prototype, "props", {
|
763
791
|
set: function() {
|
764
792
|
throw Error();
|
765
793
|
}
|
766
794
|
}), typeof Reflect == "object" && Reflect.construct) {
|
767
795
|
try {
|
768
|
-
Reflect.construct(
|
769
|
-
} catch (
|
770
|
-
|
796
|
+
Reflect.construct(P, []);
|
797
|
+
} catch (ye) {
|
798
|
+
w = ye;
|
771
799
|
}
|
772
|
-
Reflect.construct(
|
800
|
+
Reflect.construct(i, [], P);
|
773
801
|
} else {
|
774
802
|
try {
|
775
|
-
|
776
|
-
} catch (
|
777
|
-
|
803
|
+
P.call();
|
804
|
+
} catch (ye) {
|
805
|
+
w = ye;
|
778
806
|
}
|
779
|
-
|
807
|
+
i.call(P.prototype);
|
780
808
|
}
|
781
809
|
} else {
|
782
810
|
try {
|
783
811
|
throw Error();
|
784
|
-
} catch (
|
785
|
-
|
812
|
+
} catch (ye) {
|
813
|
+
w = ye;
|
786
814
|
}
|
787
|
-
|
815
|
+
i();
|
788
816
|
}
|
789
|
-
} catch (
|
790
|
-
if (
|
791
|
-
for (var
|
792
|
-
`),
|
793
|
-
`),
|
794
|
-
|
795
|
-
for (;
|
796
|
-
if (
|
797
|
-
if (
|
817
|
+
} catch (ye) {
|
818
|
+
if (ye && w && typeof ye.stack == "string") {
|
819
|
+
for (var M = ye.stack.split(`
|
820
|
+
`), se = w.stack.split(`
|
821
|
+
`), W = M.length - 1, q = se.length - 1; W >= 1 && q >= 0 && M[W] !== se[q]; )
|
822
|
+
q--;
|
823
|
+
for (; W >= 1 && q >= 0; W--, q--)
|
824
|
+
if (M[W] !== se[q]) {
|
825
|
+
if (W !== 1 || q !== 1)
|
798
826
|
do
|
799
|
-
if (
|
800
|
-
var
|
801
|
-
` +
|
802
|
-
return
|
827
|
+
if (W--, q--, q < 0 || M[W] !== se[q]) {
|
828
|
+
var me = `
|
829
|
+
` + M[W].replace(" at new ", " at ");
|
830
|
+
return i.displayName && me.includes("<anonymous>") && (me = me.replace("<anonymous>", i.displayName)), typeof i == "function" && Me.set(i, me), me;
|
803
831
|
}
|
804
|
-
while (
|
832
|
+
while (W >= 1 && q >= 0);
|
805
833
|
break;
|
806
834
|
}
|
807
835
|
}
|
808
836
|
} finally {
|
809
|
-
|
837
|
+
Ue = !1, Ke.current = L, St(), Error.prepareStackTrace = j;
|
810
838
|
}
|
811
|
-
var
|
812
|
-
return typeof
|
839
|
+
var Ve = i ? i.displayName || i.name : "", $t = Ve ? Te(Ve) : "";
|
840
|
+
return typeof i == "function" && Me.set(i, $t), $t;
|
813
841
|
}
|
814
|
-
function
|
815
|
-
return
|
842
|
+
function ct(i, h, v) {
|
843
|
+
return st(i, !1);
|
816
844
|
}
|
817
|
-
function
|
818
|
-
var
|
819
|
-
return !!(
|
845
|
+
function lt(i) {
|
846
|
+
var h = i.prototype;
|
847
|
+
return !!(h && h.isReactComponent);
|
820
848
|
}
|
821
|
-
function
|
822
|
-
if (
|
849
|
+
function Re(i, h, v) {
|
850
|
+
if (i == null)
|
823
851
|
return "";
|
824
|
-
if (typeof
|
825
|
-
return
|
826
|
-
if (typeof
|
827
|
-
return
|
828
|
-
switch (
|
852
|
+
if (typeof i == "function")
|
853
|
+
return st(i, lt(i));
|
854
|
+
if (typeof i == "string")
|
855
|
+
return Te(i);
|
856
|
+
switch (i) {
|
829
857
|
case p:
|
830
|
-
return
|
831
|
-
case
|
832
|
-
return
|
858
|
+
return Te("Suspense");
|
859
|
+
case m:
|
860
|
+
return Te("SuspenseList");
|
833
861
|
}
|
834
|
-
if (typeof
|
835
|
-
switch (
|
862
|
+
if (typeof i == "object")
|
863
|
+
switch (i.$$typeof) {
|
836
864
|
case d:
|
837
|
-
return
|
865
|
+
return ct(i.render);
|
838
866
|
case b:
|
839
|
-
return
|
867
|
+
return Re(i.type, h, v);
|
840
868
|
case x: {
|
841
|
-
var
|
869
|
+
var w = i, j = w._payload, L = w._init;
|
842
870
|
try {
|
843
|
-
return
|
871
|
+
return Re(L(j), h, v);
|
844
872
|
} catch {
|
845
873
|
}
|
846
874
|
}
|
847
875
|
}
|
848
876
|
return "";
|
849
877
|
}
|
850
|
-
var
|
851
|
-
function
|
852
|
-
if (
|
853
|
-
var
|
854
|
-
|
878
|
+
var Be = Object.prototype.hasOwnProperty, ut = {}, qe = H.ReactDebugCurrentFrame;
|
879
|
+
function we(i) {
|
880
|
+
if (i) {
|
881
|
+
var h = i._owner, v = Re(i.type, i._source, h ? h.type : null);
|
882
|
+
qe.setExtraStackFrame(v);
|
855
883
|
} else
|
856
|
-
|
884
|
+
qe.setExtraStackFrame(null);
|
857
885
|
}
|
858
|
-
function
|
886
|
+
function Pe(i, h, v, w, j) {
|
859
887
|
{
|
860
|
-
var
|
861
|
-
for (var
|
862
|
-
if (
|
863
|
-
var
|
888
|
+
var L = Function.call.bind(Be);
|
889
|
+
for (var P in i)
|
890
|
+
if (L(i, P)) {
|
891
|
+
var M = void 0;
|
864
892
|
try {
|
865
|
-
if (typeof
|
866
|
-
var
|
867
|
-
throw
|
893
|
+
if (typeof i[P] != "function") {
|
894
|
+
var se = Error((w || "React class") + ": " + v + " 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`.");
|
895
|
+
throw se.name = "Invariant Violation", se;
|
868
896
|
}
|
869
|
-
|
870
|
-
} catch (
|
871
|
-
|
897
|
+
M = i[P](h, P, w, v, null, "SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED");
|
898
|
+
} catch (W) {
|
899
|
+
M = W;
|
872
900
|
}
|
873
|
-
|
901
|
+
M && !(M instanceof Error) && (we(j), O("%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", v, P, typeof M), we(null)), M instanceof Error && !(M.message in ut) && (ut[M.message] = !0, we(j), O("Failed %s type: %s", v, M.message), we(null));
|
874
902
|
}
|
875
903
|
}
|
876
904
|
}
|
877
|
-
var
|
878
|
-
function
|
879
|
-
return
|
905
|
+
var Tt = Array.isArray;
|
906
|
+
function Ze(i) {
|
907
|
+
return Tt(i);
|
880
908
|
}
|
881
|
-
function
|
909
|
+
function dt(i) {
|
882
910
|
{
|
883
|
-
var
|
884
|
-
return
|
911
|
+
var h = typeof Symbol == "function" && Symbol.toStringTag, v = h && i[Symbol.toStringTag] || i.constructor.name || "Object";
|
912
|
+
return v;
|
885
913
|
}
|
886
914
|
}
|
887
|
-
function
|
915
|
+
function Je(i) {
|
888
916
|
try {
|
889
|
-
return
|
917
|
+
return ft(i), !1;
|
890
918
|
} catch {
|
891
919
|
return !0;
|
892
920
|
}
|
893
921
|
}
|
894
|
-
function
|
895
|
-
return "" +
|
922
|
+
function ft(i) {
|
923
|
+
return "" + i;
|
896
924
|
}
|
897
|
-
function
|
898
|
-
if (
|
899
|
-
return
|
925
|
+
function ht(i) {
|
926
|
+
if (Je(i))
|
927
|
+
return O("The provided key is an unsupported type %s. This value must be coerced to a string before before using it here.", dt(i)), ft(i);
|
900
928
|
}
|
901
|
-
var
|
929
|
+
var Ce = H.ReactCurrentOwner, Mt = {
|
902
930
|
key: !0,
|
903
931
|
ref: !0,
|
904
932
|
__self: !0,
|
905
933
|
__source: !0
|
906
|
-
},
|
907
|
-
|
908
|
-
function i
|
909
|
-
if (
|
910
|
-
var
|
911
|
-
if (
|
934
|
+
}, pt, Qe, ge;
|
935
|
+
ge = {};
|
936
|
+
function o(i) {
|
937
|
+
if (Be.call(i, "ref")) {
|
938
|
+
var h = Object.getOwnPropertyDescriptor(i, "ref").get;
|
939
|
+
if (h && h.isReactWarning)
|
912
940
|
return !1;
|
913
941
|
}
|
914
|
-
return
|
942
|
+
return i.ref !== void 0;
|
915
943
|
}
|
916
|
-
function E(
|
917
|
-
if (
|
918
|
-
var
|
919
|
-
if (
|
944
|
+
function E(i) {
|
945
|
+
if (Be.call(i, "key")) {
|
946
|
+
var h = Object.getOwnPropertyDescriptor(i, "key").get;
|
947
|
+
if (h && h.isReactWarning)
|
920
948
|
return !1;
|
921
949
|
}
|
922
|
-
return
|
950
|
+
return i.key !== void 0;
|
923
951
|
}
|
924
|
-
function
|
925
|
-
if (typeof
|
926
|
-
var
|
927
|
-
|
952
|
+
function _(i, h) {
|
953
|
+
if (typeof i.ref == "string" && Ce.current && h && Ce.current.stateNode !== h) {
|
954
|
+
var v = U(Ce.current.type);
|
955
|
+
ge[v] || (O('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', U(Ce.current.type), i.ref), ge[v] = !0);
|
928
956
|
}
|
929
957
|
}
|
930
|
-
function
|
958
|
+
function N(i, h) {
|
931
959
|
{
|
932
|
-
var
|
933
|
-
|
960
|
+
var v = function() {
|
961
|
+
pt || (pt = !0, O("%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));
|
934
962
|
};
|
935
|
-
|
936
|
-
get:
|
963
|
+
v.isReactWarning = !0, Object.defineProperty(i, "key", {
|
964
|
+
get: v,
|
937
965
|
configurable: !0
|
938
966
|
});
|
939
967
|
}
|
940
968
|
}
|
941
|
-
function
|
969
|
+
function ne(i, h) {
|
942
970
|
{
|
943
|
-
var
|
944
|
-
|
971
|
+
var v = function() {
|
972
|
+
Qe || (Qe = !0, O("%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));
|
945
973
|
};
|
946
|
-
|
947
|
-
get:
|
974
|
+
v.isReactWarning = !0, Object.defineProperty(i, "ref", {
|
975
|
+
get: v,
|
948
976
|
configurable: !0
|
949
977
|
});
|
950
978
|
}
|
951
979
|
}
|
952
|
-
var
|
953
|
-
var
|
980
|
+
var ve = function(i, h, v, w, j, L, P) {
|
981
|
+
var M = {
|
954
982
|
// This tag allows us to uniquely identify this as a React Element
|
955
983
|
$$typeof: n,
|
956
984
|
// Built-in properties that belong on the element
|
957
|
-
type:
|
958
|
-
key:
|
959
|
-
ref:
|
960
|
-
props:
|
985
|
+
type: i,
|
986
|
+
key: h,
|
987
|
+
ref: v,
|
988
|
+
props: P,
|
961
989
|
// Record the component responsible for creating this element.
|
962
|
-
_owner:
|
990
|
+
_owner: L
|
963
991
|
};
|
964
|
-
return
|
992
|
+
return M._store = {}, Object.defineProperty(M._store, "validated", {
|
965
993
|
configurable: !1,
|
966
994
|
enumerable: !1,
|
967
995
|
writable: !0,
|
968
996
|
value: !1
|
969
|
-
}), Object.defineProperty(
|
997
|
+
}), Object.defineProperty(M, "_self", {
|
970
998
|
configurable: !1,
|
971
999
|
enumerable: !1,
|
972
1000
|
writable: !1,
|
973
|
-
value:
|
974
|
-
}), Object.defineProperty(
|
1001
|
+
value: w
|
1002
|
+
}), Object.defineProperty(M, "_source", {
|
975
1003
|
configurable: !1,
|
976
1004
|
enumerable: !1,
|
977
1005
|
writable: !1,
|
978
|
-
value:
|
979
|
-
}), Object.freeze && (Object.freeze(
|
1006
|
+
value: j
|
1007
|
+
}), Object.freeze && (Object.freeze(M.props), Object.freeze(M)), M;
|
980
1008
|
};
|
981
|
-
function
|
1009
|
+
function le(i, h, v, w, j) {
|
982
1010
|
{
|
983
|
-
var
|
984
|
-
|
985
|
-
for (
|
986
|
-
|
987
|
-
if (
|
988
|
-
var
|
989
|
-
for (
|
990
|
-
|
1011
|
+
var L, P = {}, M = null, se = null;
|
1012
|
+
v !== void 0 && (ht(v), M = "" + v), E(h) && (ht(h.key), M = "" + h.key), o(h) && (se = h.ref, _(h, j));
|
1013
|
+
for (L in h)
|
1014
|
+
Be.call(h, L) && !Mt.hasOwnProperty(L) && (P[L] = h[L]);
|
1015
|
+
if (i && i.defaultProps) {
|
1016
|
+
var W = i.defaultProps;
|
1017
|
+
for (L in W)
|
1018
|
+
P[L] === void 0 && (P[L] = W[L]);
|
991
1019
|
}
|
992
|
-
if (
|
993
|
-
var
|
994
|
-
|
1020
|
+
if (M || se) {
|
1021
|
+
var q = typeof i == "function" ? i.displayName || i.name || "Unknown" : i;
|
1022
|
+
M && N(P, q), se && ne(P, q);
|
995
1023
|
}
|
996
|
-
return
|
1024
|
+
return ve(i, M, se, j, w, Ce.current, P);
|
997
1025
|
}
|
998
1026
|
}
|
999
|
-
var
|
1000
|
-
function
|
1001
|
-
if (
|
1002
|
-
var
|
1003
|
-
|
1027
|
+
var mt = H.ReactCurrentOwner, gt = H.ReactDebugCurrentFrame;
|
1028
|
+
function be(i) {
|
1029
|
+
if (i) {
|
1030
|
+
var h = i._owner, v = Re(i.type, i._source, h ? h.type : null);
|
1031
|
+
gt.setExtraStackFrame(v);
|
1004
1032
|
} else
|
1005
|
-
|
1033
|
+
gt.setExtraStackFrame(null);
|
1006
1034
|
}
|
1007
|
-
var
|
1008
|
-
|
1009
|
-
function
|
1010
|
-
return typeof
|
1035
|
+
var fe;
|
1036
|
+
fe = !1;
|
1037
|
+
function he(i) {
|
1038
|
+
return typeof i == "object" && i !== null && i.$$typeof === n;
|
1011
1039
|
}
|
1012
|
-
function
|
1040
|
+
function $e() {
|
1013
1041
|
{
|
1014
|
-
if (
|
1015
|
-
var
|
1016
|
-
if (
|
1042
|
+
if (mt.current) {
|
1043
|
+
var i = U(mt.current.type);
|
1044
|
+
if (i)
|
1017
1045
|
return `
|
1018
1046
|
|
1019
|
-
Check the render method of \`` +
|
1047
|
+
Check the render method of \`` + i + "`.";
|
1020
1048
|
}
|
1021
1049
|
return "";
|
1022
1050
|
}
|
1023
1051
|
}
|
1024
|
-
function
|
1052
|
+
function je(i) {
|
1025
1053
|
{
|
1026
|
-
if (
|
1027
|
-
var
|
1054
|
+
if (i !== void 0) {
|
1055
|
+
var h = i.fileName.replace(/^.*[\\\/]/, ""), v = i.lineNumber;
|
1028
1056
|
return `
|
1029
1057
|
|
1030
|
-
Check your code at ` +
|
1058
|
+
Check your code at ` + h + ":" + v + ".";
|
1031
1059
|
}
|
1032
1060
|
return "";
|
1033
1061
|
}
|
1034
1062
|
}
|
1035
|
-
var
|
1036
|
-
function
|
1063
|
+
var Se = {};
|
1064
|
+
function Ge(i) {
|
1037
1065
|
{
|
1038
|
-
var
|
1039
|
-
if (!
|
1040
|
-
var
|
1041
|
-
|
1066
|
+
var h = $e();
|
1067
|
+
if (!h) {
|
1068
|
+
var v = typeof i == "string" ? i : i.displayName || i.name;
|
1069
|
+
v && (h = `
|
1042
1070
|
|
1043
|
-
Check the top-level render call using <` +
|
1071
|
+
Check the top-level render call using <` + v + ">.");
|
1044
1072
|
}
|
1045
|
-
return
|
1073
|
+
return h;
|
1046
1074
|
}
|
1047
1075
|
}
|
1048
|
-
function
|
1076
|
+
function Ft(i, h) {
|
1049
1077
|
{
|
1050
|
-
if (!
|
1078
|
+
if (!i._store || i._store.validated || i.key != null)
|
1051
1079
|
return;
|
1052
|
-
|
1053
|
-
var
|
1054
|
-
if (
|
1080
|
+
i._store.validated = !0;
|
1081
|
+
var v = Ge(h);
|
1082
|
+
if (Se[v])
|
1055
1083
|
return;
|
1056
|
-
|
1057
|
-
var
|
1058
|
-
|
1084
|
+
Se[v] = !0;
|
1085
|
+
var w = "";
|
1086
|
+
i && i._owner && i._owner !== mt.current && (w = " It was passed a child from " + U(i._owner.type) + "."), be(i), O('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', v, w), be(null);
|
1059
1087
|
}
|
1060
1088
|
}
|
1061
|
-
function
|
1089
|
+
function Ut(i, h) {
|
1062
1090
|
{
|
1063
|
-
if (typeof
|
1091
|
+
if (typeof i != "object")
|
1064
1092
|
return;
|
1065
|
-
if (
|
1066
|
-
for (var
|
1067
|
-
var
|
1068
|
-
|
1093
|
+
if (Ze(i))
|
1094
|
+
for (var v = 0; v < i.length; v++) {
|
1095
|
+
var w = i[v];
|
1096
|
+
he(w) && Ft(w, h);
|
1069
1097
|
}
|
1070
|
-
else if (
|
1071
|
-
|
1072
|
-
else if (
|
1073
|
-
var
|
1074
|
-
if (typeof
|
1075
|
-
for (var
|
1076
|
-
|
1098
|
+
else if (he(i))
|
1099
|
+
i._store && (i._store.validated = !0);
|
1100
|
+
else if (i) {
|
1101
|
+
var j = Q(i);
|
1102
|
+
if (typeof j == "function" && j !== i.entries)
|
1103
|
+
for (var L = j.call(i), P; !(P = L.next()).done; )
|
1104
|
+
he(P.value) && Ft(P.value, h);
|
1077
1105
|
}
|
1078
1106
|
}
|
1079
1107
|
}
|
1080
|
-
function
|
1108
|
+
function bn(i) {
|
1081
1109
|
{
|
1082
|
-
var
|
1083
|
-
if (
|
1110
|
+
var h = i.type;
|
1111
|
+
if (h == null || typeof h == "string")
|
1084
1112
|
return;
|
1085
|
-
var
|
1086
|
-
if (typeof
|
1087
|
-
|
1088
|
-
else if (typeof
|
1113
|
+
var v;
|
1114
|
+
if (typeof h == "function")
|
1115
|
+
v = h.propTypes;
|
1116
|
+
else if (typeof h == "object" && (h.$$typeof === d || // Note: Memo only checks outer props here.
|
1089
1117
|
// Inner props are checked in the reconciler.
|
1090
|
-
|
1091
|
-
|
1118
|
+
h.$$typeof === b))
|
1119
|
+
v = h.propTypes;
|
1092
1120
|
else
|
1093
1121
|
return;
|
1094
|
-
if (
|
1095
|
-
var
|
1096
|
-
|
1097
|
-
} else if (
|
1098
|
-
|
1099
|
-
var
|
1100
|
-
|
1122
|
+
if (v) {
|
1123
|
+
var w = U(h);
|
1124
|
+
Pe(v, i.props, "prop", w, i);
|
1125
|
+
} else if (h.PropTypes !== void 0 && !fe) {
|
1126
|
+
fe = !0;
|
1127
|
+
var j = U(h);
|
1128
|
+
O("Component %s declared `PropTypes` instead of `propTypes`. Did you misspell the property assignment?", j || "Unknown");
|
1101
1129
|
}
|
1102
|
-
typeof
|
1130
|
+
typeof h.getDefaultProps == "function" && !h.getDefaultProps.isReactClassApproved && O("getDefaultProps is only used on classic React.createClass definitions. Use a static property named `defaultProps` instead.");
|
1103
1131
|
}
|
1104
1132
|
}
|
1105
|
-
function
|
1133
|
+
function yn(i) {
|
1106
1134
|
{
|
1107
|
-
for (var
|
1108
|
-
var
|
1109
|
-
if (
|
1110
|
-
|
1135
|
+
for (var h = Object.keys(i.props), v = 0; v < h.length; v++) {
|
1136
|
+
var w = h[v];
|
1137
|
+
if (w !== "children" && w !== "key") {
|
1138
|
+
be(i), O("Invalid prop `%s` supplied to `React.Fragment`. React.Fragment can only have `key` and `children` props.", w), be(null);
|
1111
1139
|
break;
|
1112
1140
|
}
|
1113
1141
|
}
|
1114
|
-
|
1142
|
+
i.ref !== null && (be(i), O("Invalid attribute `ref` supplied to `React.Fragment`."), be(null));
|
1115
1143
|
}
|
1116
1144
|
}
|
1117
|
-
function
|
1145
|
+
function Bt(i, h, v, w, j, L) {
|
1118
1146
|
{
|
1119
|
-
var
|
1120
|
-
if (!
|
1121
|
-
var
|
1122
|
-
(
|
1123
|
-
var
|
1124
|
-
|
1125
|
-
var
|
1126
|
-
|
1147
|
+
var P = T(i);
|
1148
|
+
if (!P) {
|
1149
|
+
var M = "";
|
1150
|
+
(i === void 0 || typeof i == "object" && i !== null && Object.keys(i).length === 0) && (M += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
1151
|
+
var se = je(j);
|
1152
|
+
se ? M += se : M += $e();
|
1153
|
+
var W;
|
1154
|
+
i === null ? W = "null" : Ze(i) ? W = "array" : i !== void 0 && i.$$typeof === n ? (W = "<" + (U(i.type) || "Unknown") + " />", M = " Did you accidentally export a JSX literal instead of a component?") : W = typeof i, O("React.jsx: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", W, M);
|
1127
1155
|
}
|
1128
|
-
var
|
1129
|
-
if (
|
1130
|
-
return
|
1131
|
-
if (
|
1132
|
-
var
|
1133
|
-
if (
|
1134
|
-
if (
|
1135
|
-
if (
|
1136
|
-
for (var
|
1137
|
-
|
1138
|
-
Object.freeze && Object.freeze(
|
1156
|
+
var q = le(i, h, v, j, L);
|
1157
|
+
if (q == null)
|
1158
|
+
return q;
|
1159
|
+
if (P) {
|
1160
|
+
var me = h.children;
|
1161
|
+
if (me !== void 0)
|
1162
|
+
if (w)
|
1163
|
+
if (Ze(me)) {
|
1164
|
+
for (var Ve = 0; Ve < me.length; Ve++)
|
1165
|
+
Ut(me[Ve], i);
|
1166
|
+
Object.freeze && Object.freeze(me);
|
1139
1167
|
} else
|
1140
|
-
|
1168
|
+
O("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");
|
1141
1169
|
else
|
1142
|
-
|
1170
|
+
Ut(me, i);
|
1143
1171
|
}
|
1144
|
-
return
|
1172
|
+
return i === e ? yn(q) : bn(q), q;
|
1145
1173
|
}
|
1146
1174
|
}
|
1147
|
-
function
|
1148
|
-
return
|
1175
|
+
function En(i, h, v) {
|
1176
|
+
return Bt(i, h, v, !0);
|
1149
1177
|
}
|
1150
|
-
function
|
1151
|
-
return
|
1178
|
+
function xn(i, h, v) {
|
1179
|
+
return Bt(i, h, v, !1);
|
1152
1180
|
}
|
1153
|
-
var
|
1154
|
-
|
1155
|
-
}()),
|
1181
|
+
var wn = xn, Cn = En;
|
1182
|
+
nt.Fragment = e, nt.jsx = wn, nt.jsxs = Cn;
|
1183
|
+
}()), nt;
|
1156
1184
|
}
|
1157
|
-
process.env.NODE_ENV === "production" ?
|
1158
|
-
var
|
1159
|
-
function
|
1160
|
-
return t.title.search("<") > -1 ? /* @__PURE__ */
|
1185
|
+
process.env.NODE_ENV === "production" ? It.exports = ia() : It.exports = ra();
|
1186
|
+
var u = It.exports;
|
1187
|
+
function mn(t) {
|
1188
|
+
return t.title.search("<") > -1 ? /* @__PURE__ */ u.jsx("button", { className: "svg", dangerouslySetInnerHTML: { __html: t.title } }) : /* @__PURE__ */ u.jsx("button", { children: t.title });
|
1161
1189
|
}
|
1162
|
-
const
|
1163
|
-
/* @__PURE__ */
|
1164
|
-
/* @__PURE__ */
|
1165
|
-
/* @__PURE__ */
|
1166
|
-
] }),
|
1190
|
+
const oa = /* @__PURE__ */ u.jsxs("svg", { className: "closeIcon", width: "14", height: "14", fill: "none", stroke: "#666666", strokeMiterlimit: "10", children: [
|
1191
|
+
/* @__PURE__ */ u.jsx("circle", { cx: "7", cy: "7", r: "6" }),
|
1192
|
+
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "4", x2: "10", y2: "10" }),
|
1193
|
+
/* @__PURE__ */ u.jsx("line", { x1: "4", y1: "10", x2: "10", y2: "4" })
|
1194
|
+
] }), sa = /* @__PURE__ */ u.jsx("svg", { className: "dragIcon", width: "14", height: "14", fill: "#666666", stroke: "none", children: /* @__PURE__ */ u.jsx(
|
1167
1195
|
"path",
|
1168
1196
|
{
|
1169
1197
|
d: `M10.43,4H3.57C3.26,4,3,4.22,3,4.5v1C3,5.78,3.26,6,3.57,6h6.86C10.74,6,11,5.78,11,5.5v-1
|
@@ -1171,46 +1199,46 @@ C11,4.22,10.74,4,10.43,4z M10.43,8H3.57C3.26,8,3,8.22,3,8.5v1C3,9.78,3.26,10,3.5
|
|
1171
1199
|
C11,8.22,10.74,8,10.43,8z`
|
1172
1200
|
}
|
1173
1201
|
) });
|
1174
|
-
function
|
1175
|
-
return /* @__PURE__ */
|
1176
|
-
|
1177
|
-
/* @__PURE__ */
|
1178
|
-
/* @__PURE__ */
|
1202
|
+
function ca(t) {
|
1203
|
+
return /* @__PURE__ */ u.jsx(un.Item, { value: t.title, children: /* @__PURE__ */ u.jsxs("div", { children: [
|
1204
|
+
sa,
|
1205
|
+
/* @__PURE__ */ u.jsx("span", { children: t.title }),
|
1206
|
+
/* @__PURE__ */ u.jsx("button", { className: "closeIcon", onClick: () => {
|
1179
1207
|
t.onDelete(t.index);
|
1180
|
-
}, children:
|
1208
|
+
}, children: oa })
|
1181
1209
|
] }) }, t.title);
|
1182
1210
|
}
|
1183
|
-
function
|
1184
|
-
const [n, a] =
|
1185
|
-
t.onDragComplete(p),
|
1211
|
+
function la(t) {
|
1212
|
+
const [n, a] = ie(!1), [e, r] = ie(t.options), s = (p) => {
|
1213
|
+
t.onDragComplete(p), r(p);
|
1186
1214
|
}, c = (p) => {
|
1187
|
-
const
|
1188
|
-
|
1189
|
-
},
|
1190
|
-
e.forEach((p,
|
1191
|
-
|
1215
|
+
const m = [...e];
|
1216
|
+
m.splice(p, 1), s(m);
|
1217
|
+
}, l = [];
|
1218
|
+
e.forEach((p, m) => {
|
1219
|
+
l.push(/* @__PURE__ */ u.jsx(ca, { index: m, title: p, onDelete: c }, p));
|
1192
1220
|
});
|
1193
1221
|
let d = "dropdown draggable";
|
1194
|
-
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */
|
1195
|
-
/* @__PURE__ */
|
1196
|
-
/* @__PURE__ */
|
1222
|
+
return t.subdropdown && (d += " subdropdown"), /* @__PURE__ */ u.jsxs("div", { className: d, onMouseEnter: () => a(!0), onMouseLeave: () => a(!1), children: [
|
1223
|
+
/* @__PURE__ */ u.jsx(mn, { title: t.title }),
|
1224
|
+
/* @__PURE__ */ u.jsx(un.Group, { axis: "y", values: e, onReorder: s, style: { visibility: n ? "visible" : "hidden" }, children: l })
|
1197
1225
|
] });
|
1198
1226
|
}
|
1199
|
-
function
|
1200
|
-
const [n, a] =
|
1201
|
-
t.options.map((
|
1202
|
-
t.onSelect !== void 0 && (
|
1227
|
+
function ua(t) {
|
1228
|
+
const [n, a] = ie(!1), e = [];
|
1229
|
+
t.options.map((s, c) => {
|
1230
|
+
t.onSelect !== void 0 && (s.onSelect = t.onSelect), e.push(/* @__PURE__ */ u.jsx(da, { option: s }, c));
|
1203
1231
|
});
|
1204
|
-
let
|
1205
|
-
return t.subdropdown && (
|
1232
|
+
let r = "dropdown";
|
1233
|
+
return t.subdropdown && (r += " subdropdown"), /* @__PURE__ */ u.jsxs(
|
1206
1234
|
"div",
|
1207
1235
|
{
|
1208
|
-
className:
|
1236
|
+
className: r,
|
1209
1237
|
onMouseEnter: () => a(!0),
|
1210
1238
|
onMouseLeave: () => a(!1),
|
1211
1239
|
children: [
|
1212
|
-
/* @__PURE__ */
|
1213
|
-
/* @__PURE__ */
|
1240
|
+
/* @__PURE__ */ u.jsx(mn, { title: t.title }),
|
1241
|
+
/* @__PURE__ */ u.jsx(
|
1214
1242
|
"ul",
|
1215
1243
|
{
|
1216
1244
|
style: { visibility: n ? "visible" : "hidden" },
|
@@ -1221,26 +1249,26 @@ function aa(t) {
|
|
1221
1249
|
}
|
1222
1250
|
);
|
1223
1251
|
}
|
1224
|
-
function
|
1225
|
-
const { option: n } = t, [a, e] =
|
1226
|
-
let
|
1252
|
+
function da(t) {
|
1253
|
+
const { option: n } = t, [a, e] = ie("");
|
1254
|
+
let r;
|
1227
1255
|
switch (n.type) {
|
1228
1256
|
case "draggable":
|
1229
|
-
|
1230
|
-
|
1257
|
+
r = /* @__PURE__ */ u.jsx(
|
1258
|
+
la,
|
1231
1259
|
{
|
1232
1260
|
title: n.title,
|
1233
1261
|
options: n.value,
|
1234
|
-
onDragComplete: (
|
1235
|
-
n.onDragComplete !== void 0 && n.onDragComplete(
|
1262
|
+
onDragComplete: (s) => {
|
1263
|
+
n.onDragComplete !== void 0 && n.onDragComplete(s);
|
1236
1264
|
},
|
1237
1265
|
subdropdown: !0
|
1238
1266
|
}
|
1239
1267
|
);
|
1240
1268
|
break;
|
1241
1269
|
case "dropdown":
|
1242
|
-
|
1243
|
-
|
1270
|
+
r = /* @__PURE__ */ u.jsx(
|
1271
|
+
ua,
|
1244
1272
|
{
|
1245
1273
|
title: n.title,
|
1246
1274
|
options: n.value,
|
@@ -1250,7 +1278,7 @@ function ra(t) {
|
|
1250
1278
|
);
|
1251
1279
|
break;
|
1252
1280
|
case "option":
|
1253
|
-
|
1281
|
+
r = /* @__PURE__ */ u.jsx(
|
1254
1282
|
"button",
|
1255
1283
|
{
|
1256
1284
|
onClick: () => {
|
@@ -1261,22 +1289,22 @@ function ra(t) {
|
|
1261
1289
|
);
|
1262
1290
|
break;
|
1263
1291
|
}
|
1264
|
-
return /* @__PURE__ */
|
1292
|
+
return /* @__PURE__ */ u.jsx("li", { className: a === n.title ? "selected" : "", children: r }, qn());
|
1265
1293
|
}
|
1266
|
-
function
|
1294
|
+
function ni(t) {
|
1267
1295
|
let n;
|
1268
1296
|
function a(c) {
|
1269
|
-
var d, p,
|
1270
|
-
let
|
1297
|
+
var d, p, m, b, x, C, S, F, Q;
|
1298
|
+
let l;
|
1271
1299
|
switch (c.event) {
|
1272
1300
|
case "custom":
|
1273
|
-
|
1301
|
+
k.dispatchEvent({ type: A.CUSTOM, value: c.data });
|
1274
1302
|
break;
|
1275
1303
|
case "selectComponent":
|
1276
|
-
|
1304
|
+
k.dispatchEvent({ type: A.SELECT_DROPDOWN, value: c.data });
|
1277
1305
|
break;
|
1278
1306
|
case "draggableListUpdate":
|
1279
|
-
|
1307
|
+
k.dispatchEvent({ type: A.DRAG_UPDATE, value: c.data });
|
1280
1308
|
break;
|
1281
1309
|
case "addFolder":
|
1282
1310
|
(d = t.components.get("debug")) == null || d.addFolder(c.data.name, c.data.params, c.data.parent);
|
@@ -1285,7 +1313,7 @@ function Ka(t) {
|
|
1285
1313
|
(p = t.components.get("debug")) == null || p.bind(c.data.name, c.data.params, c.data.parent);
|
1286
1314
|
break;
|
1287
1315
|
case "updateBind":
|
1288
|
-
(
|
1316
|
+
(m = t.components.get("debug")) == null || m.triggerBind(c.data.id, c.data.value);
|
1289
1317
|
break;
|
1290
1318
|
case "addButton":
|
1291
1319
|
(b = t.components.get("debug")) == null || b.button(c.data.name, c.data.callback, c.data.parent);
|
@@ -1294,71 +1322,77 @@ function Ka(t) {
|
|
1294
1322
|
(x = t.components.get("debug")) == null || x.triggerButton(c.data.id);
|
1295
1323
|
break;
|
1296
1324
|
case "setSheet":
|
1297
|
-
|
1325
|
+
l = (C = t.components.get("theatre")) == null ? void 0 : C.sheets.get(c.data.sheet), l !== void 0 && (n = l, et.setSelection([l]));
|
1298
1326
|
break;
|
1299
1327
|
case "setSheetObject":
|
1300
|
-
|
1328
|
+
l = (S = t.components.get("theatre")) == null ? void 0 : S.sheetObjects.get(`${c.data.sheet}_${c.data.key}`), l !== void 0 && et.setSelection([l]);
|
1301
1329
|
break;
|
1302
1330
|
case "updateSheetObject":
|
1303
|
-
|
1331
|
+
l = (F = t.components.get("theatre")) == null ? void 0 : F.sheetObjectCBs.get(c.data.sheetObject), l !== void 0 && l(c.data.values);
|
1304
1332
|
break;
|
1305
1333
|
case "updateTimeline":
|
1306
|
-
n = (
|
1334
|
+
n = (Q = t.components.get("theatre")) == null ? void 0 : Q.sheets.get(c.data.sheet), n !== void 0 && (n.sequence.position = c.data.position);
|
1307
1335
|
break;
|
1308
1336
|
case "getObject":
|
1309
|
-
|
1337
|
+
k.dispatchEvent({ type: A.GET_OBJECT, value: c.data });
|
1310
1338
|
break;
|
1311
1339
|
case "updateObject":
|
1312
|
-
|
1340
|
+
k.dispatchEvent({ type: A.UPDATE_OBJECT, value: c.data });
|
1313
1341
|
break;
|
1314
1342
|
case "createTexture":
|
1315
|
-
|
1343
|
+
k.dispatchEvent({ type: A.CREATE_TEXTURE, value: c.data });
|
1316
1344
|
break;
|
1317
1345
|
case "requestMethod":
|
1318
|
-
|
1346
|
+
k.dispatchEvent({ type: A.REQUEST_METHOD, value: c.data });
|
1319
1347
|
break;
|
1320
1348
|
}
|
1321
1349
|
}
|
1322
1350
|
function e(c) {
|
1323
1351
|
switch (c.event) {
|
1324
1352
|
case "custom":
|
1325
|
-
|
1353
|
+
k.dispatchEvent({ type: A.CUSTOM, value: c.data });
|
1326
1354
|
break;
|
1327
1355
|
case "setObject":
|
1328
|
-
|
1356
|
+
k.dispatchEvent({ type: A.SET_OBJECT, value: c.data });
|
1329
1357
|
break;
|
1330
1358
|
case "setScene":
|
1331
|
-
|
1359
|
+
k.dispatchEvent({ type: A.SET_SCENE, value: c.data });
|
1360
|
+
break;
|
1361
|
+
case "addCamera":
|
1362
|
+
k.dispatchEvent({ type: A.ADD_CAMERA, value: c.data });
|
1363
|
+
break;
|
1364
|
+
case "removeCamera":
|
1365
|
+
k.dispatchEvent({ type: A.REMOVE_CAMERA, value: c.data });
|
1332
1366
|
break;
|
1333
1367
|
}
|
1334
1368
|
}
|
1335
|
-
function
|
1336
|
-
|
1369
|
+
function r() {
|
1370
|
+
et.ui.hide();
|
1337
1371
|
}
|
1338
|
-
function
|
1339
|
-
|
1340
|
-
p.length < 1 || p.forEach((
|
1341
|
-
var
|
1342
|
-
let b =
|
1343
|
-
switch (
|
1372
|
+
function s() {
|
1373
|
+
et.ui.restore(), et.onSelectionChange((p) => {
|
1374
|
+
p.length < 1 || p.forEach((m) => {
|
1375
|
+
var S;
|
1376
|
+
let b = m.address.sheetId, x = "setSheet", C = {};
|
1377
|
+
switch (m.type) {
|
1344
1378
|
case "Theatre_Sheet_PublicAPI":
|
1345
|
-
x = "setSheet",
|
1346
|
-
sheet:
|
1347
|
-
}, n = (
|
1379
|
+
x = "setSheet", C = {
|
1380
|
+
sheet: m.address.sheetId
|
1381
|
+
}, n = (S = t.components.get("theatre")) == null ? void 0 : S.sheets.get(m.address.sheetId);
|
1348
1382
|
break;
|
1349
1383
|
case "Theatre_SheetObject_PublicAPI":
|
1350
|
-
x = "setSheetObject", b += `_${
|
1384
|
+
x = "setSheetObject", b += `_${m.address.objectKey}`, C = {
|
1351
1385
|
id: b,
|
1352
|
-
sheet:
|
1353
|
-
key:
|
1386
|
+
sheet: m.address.sheetId,
|
1387
|
+
key: m.address.objectKey
|
1354
1388
|
};
|
1355
1389
|
break;
|
1356
1390
|
}
|
1357
|
-
t.send({ event: x, target: "app", data:
|
1391
|
+
t.send({ event: x, target: "app", data: C });
|
1358
1392
|
});
|
1359
1393
|
});
|
1360
1394
|
let c = 0;
|
1361
|
-
const
|
1395
|
+
const l = () => {
|
1362
1396
|
if (n !== void 0 && c !== n.sequence.position) {
|
1363
1397
|
c = n.sequence.position;
|
1364
1398
|
const p = n;
|
@@ -1372,15 +1406,15 @@ function Ka(t) {
|
|
1372
1406
|
});
|
1373
1407
|
}
|
1374
1408
|
}, d = () => {
|
1375
|
-
|
1409
|
+
l(), requestAnimationFrame(d);
|
1376
1410
|
};
|
1377
|
-
|
1411
|
+
l(), d();
|
1378
1412
|
}
|
1379
1413
|
t.listen((c) => {
|
1380
1414
|
t.editor ? e(c) : a(c);
|
1381
|
-
}), t.editor ?
|
1415
|
+
}), t.editor ? s() : r();
|
1382
1416
|
}
|
1383
|
-
const
|
1417
|
+
const fa = `out vec3 worldPosition;
|
1384
1418
|
uniform float uDistance;
|
1385
1419
|
|
1386
1420
|
void main() {
|
@@ -1389,7 +1423,7 @@ void main() {
|
|
1389
1423
|
worldPosition.xz += cameraPosition.xz;
|
1390
1424
|
|
1391
1425
|
gl_Position = projectionMatrix * modelViewMatrix * vec4(worldPosition, 1.0);
|
1392
|
-
}`,
|
1426
|
+
}`, ha = `out vec4 fragColor;
|
1393
1427
|
in vec3 worldPosition;
|
1394
1428
|
|
1395
1429
|
uniform float uDivisions;
|
@@ -1457,14 +1491,14 @@ void main() {
|
|
1457
1491
|
|
1458
1492
|
if (fragColor.a <= 0.0) discard;
|
1459
1493
|
}`;
|
1460
|
-
class
|
1494
|
+
class pa extends rn {
|
1461
1495
|
constructor(n) {
|
1462
1496
|
super({
|
1463
1497
|
extensions: {
|
1464
1498
|
derivatives: !0
|
1465
1499
|
},
|
1466
|
-
glslVersion:
|
1467
|
-
side:
|
1500
|
+
glslVersion: Rn,
|
1501
|
+
side: Pn,
|
1468
1502
|
transparent: !0,
|
1469
1503
|
uniforms: {
|
1470
1504
|
uScale: {
|
@@ -1474,7 +1508,7 @@ class sa extends Qt {
|
|
1474
1508
|
value: (n == null ? void 0 : n.divisions) !== void 0 ? n == null ? void 0 : n.divisions : 10
|
1475
1509
|
},
|
1476
1510
|
uColor: {
|
1477
|
-
value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new
|
1511
|
+
value: (n == null ? void 0 : n.color) !== void 0 ? n == null ? void 0 : n.color : new Nt(16777215)
|
1478
1512
|
},
|
1479
1513
|
uDistance: {
|
1480
1514
|
value: (n == null ? void 0 : n.distance) !== void 0 ? n == null ? void 0 : n.distance : 1e4
|
@@ -1486,25 +1520,25 @@ class sa extends Qt {
|
|
1486
1520
|
value: (n == null ? void 0 : n.gridOpacity) !== void 0 ? n == null ? void 0 : n.gridOpacity : 0.25
|
1487
1521
|
}
|
1488
1522
|
},
|
1489
|
-
vertexShader:
|
1490
|
-
fragmentShader:
|
1523
|
+
vertexShader: fa,
|
1524
|
+
fragmentShader: ha,
|
1491
1525
|
name: "InfiniteGrid",
|
1492
1526
|
depthWrite: !1
|
1493
1527
|
});
|
1494
1528
|
}
|
1495
1529
|
}
|
1496
|
-
class
|
1530
|
+
class ma extends jn {
|
1497
1531
|
constructor() {
|
1498
|
-
const a = new
|
1499
|
-
super(new
|
1500
|
-
|
1532
|
+
const a = new pa();
|
1533
|
+
super(new _n(2, 2), a);
|
1534
|
+
Z(this, "gridMaterial");
|
1501
1535
|
this.gridMaterial = a, this.frustumCulled = !1, this.name = "InfiniteGridHelper", this.position.y = 0.1;
|
1502
1536
|
}
|
1503
1537
|
update() {
|
1504
1538
|
this.gridMaterial.needsUpdate = !0;
|
1505
1539
|
}
|
1506
1540
|
}
|
1507
|
-
const
|
1541
|
+
const ga = `#include <common>
|
1508
1542
|
#include <batching_pars_vertex>
|
1509
1543
|
#include <uv_pars_vertex>
|
1510
1544
|
#include <color_pars_vertex>
|
@@ -1534,7 +1568,7 @@ void main() {
|
|
1534
1568
|
#include <logdepthbuf_vertex>
|
1535
1569
|
#include <clipping_planes_vertex>
|
1536
1570
|
#include <worldpos_vertex>
|
1537
|
-
}`,
|
1571
|
+
}`, va = `
|
1538
1572
|
#include <common>
|
1539
1573
|
#include <uv_pars_fragment>
|
1540
1574
|
#include <clipping_planes_pars_fragment>
|
@@ -1543,51 +1577,51 @@ void main() {
|
|
1543
1577
|
#include <clipping_planes_fragment>
|
1544
1578
|
gl_FragColor = vec4(vec3(vUv, 0.0), 1.0);
|
1545
1579
|
}`;
|
1546
|
-
class
|
1580
|
+
class ba extends rn {
|
1547
1581
|
constructor() {
|
1548
1582
|
super({
|
1549
1583
|
defines: {
|
1550
1584
|
USE_UV: ""
|
1551
1585
|
},
|
1552
|
-
vertexShader:
|
1553
|
-
fragmentShader:
|
1586
|
+
vertexShader: ga,
|
1587
|
+
fragmentShader: va
|
1554
1588
|
});
|
1555
1589
|
}
|
1556
1590
|
}
|
1557
|
-
function
|
1558
|
-
const [n, a] =
|
1559
|
-
return /* @__PURE__ */
|
1560
|
-
/* @__PURE__ */
|
1591
|
+
function Lt(t) {
|
1592
|
+
const [n, a] = ie(t.open !== void 0 ? t.open : !0), e = !n || t.children === void 0;
|
1593
|
+
return /* @__PURE__ */ u.jsxs("div", { className: `accordion ${e ? "hide" : ""}`, children: [
|
1594
|
+
/* @__PURE__ */ u.jsxs(
|
1561
1595
|
"button",
|
1562
1596
|
{
|
1563
1597
|
className: "toggle",
|
1564
1598
|
onClick: () => {
|
1565
|
-
const
|
1566
|
-
t.onToggle !== void 0 && t.onToggle(
|
1599
|
+
const r = !n;
|
1600
|
+
t.onToggle !== void 0 && t.onToggle(r), a(r);
|
1567
1601
|
},
|
1568
1602
|
children: [
|
1569
|
-
/* @__PURE__ */
|
1603
|
+
/* @__PURE__ */ u.jsx(
|
1570
1604
|
"p",
|
1571
1605
|
{
|
1572
1606
|
className: `status ${n ? "open" : ""}`,
|
1573
1607
|
children: "Toggle"
|
1574
1608
|
}
|
1575
1609
|
),
|
1576
|
-
/* @__PURE__ */
|
1610
|
+
/* @__PURE__ */ u.jsx("p", { className: "label", children: t.label })
|
1577
1611
|
]
|
1578
1612
|
}
|
1579
1613
|
),
|
1580
1614
|
t.button,
|
1581
|
-
/* @__PURE__ */
|
1615
|
+
/* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { children: t.children }) })
|
1582
1616
|
] });
|
1583
1617
|
}
|
1584
|
-
function
|
1585
|
-
const [n, a] =
|
1586
|
-
return t.child.children.length > 0 && t.child.children.map((
|
1587
|
-
|
1588
|
-
}), /* @__PURE__ */
|
1589
|
-
/* @__PURE__ */
|
1590
|
-
e ? /* @__PURE__ */
|
1618
|
+
function gn(t) {
|
1619
|
+
const [n, a] = ie(!1), e = t.child.children.length > 0, r = [];
|
1620
|
+
return t.child.children.length > 0 && t.child.children.map((s) => {
|
1621
|
+
r.push(/* @__PURE__ */ u.jsx(gn, { child: s, three: t.three }, Math.random()));
|
1622
|
+
}), /* @__PURE__ */ u.jsxs("div", { className: "childObject", children: [
|
1623
|
+
/* @__PURE__ */ u.jsxs("div", { className: "child", children: [
|
1624
|
+
e ? /* @__PURE__ */ u.jsx(
|
1591
1625
|
"button",
|
1592
1626
|
{
|
1593
1627
|
className: "status",
|
@@ -1599,7 +1633,7 @@ function un(t) {
|
|
1599
1633
|
}
|
1600
1634
|
}
|
1601
1635
|
) : null,
|
1602
|
-
/* @__PURE__ */
|
1636
|
+
/* @__PURE__ */ u.jsx(
|
1603
1637
|
"button",
|
1604
1638
|
{
|
1605
1639
|
className: "name",
|
@@ -1612,32 +1646,32 @@ function un(t) {
|
|
1612
1646
|
children: t.child.name.length > 0 ? `${t.child.name} (${t.child.type})` : `${t.child.type}::${t.child.uuid}`
|
1613
1647
|
}
|
1614
1648
|
),
|
1615
|
-
/* @__PURE__ */
|
1649
|
+
/* @__PURE__ */ u.jsx("div", { className: `icon ${ta(t.child)}` })
|
1616
1650
|
] }),
|
1617
|
-
/* @__PURE__ */
|
1651
|
+
/* @__PURE__ */ u.jsx("div", { className: n ? "open" : "", children: /* @__PURE__ */ u.jsx("div", { className: "container", children: r }) })
|
1618
1652
|
] }, Math.random());
|
1619
1653
|
}
|
1620
|
-
function
|
1654
|
+
function ya(t) {
|
1621
1655
|
const n = [];
|
1622
1656
|
return t.child.children.map((a) => {
|
1623
|
-
n.push(/* @__PURE__ */
|
1624
|
-
}), /* @__PURE__ */
|
1657
|
+
n.push(/* @__PURE__ */ u.jsx(gn, { child: a, three: t.three }, Math.random()));
|
1658
|
+
}), /* @__PURE__ */ u.jsx("div", { className: `scene ${t.class !== void 0 ? t.class : ""}`, children: n });
|
1625
1659
|
}
|
1626
|
-
const
|
1627
|
-
function
|
1660
|
+
const Ea = "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADIAAAAyCAYAAAAeP4ixAAAACXBIWXMAAAsTAAALEwEAmpwYAAAA5klEQVRoge2Y0Q6EIAwE6cX//+X6cCFpSMEKVTdk501OpRNKiyelFC0b8Ps6gCwoggZF0KAIGhRBgyJoUAQNiqCxjciR9SLV//eZiAyvK3U8i/QVaQO2YyLSFVvlkdTKDjJCukh2ykR5ZEW+kHmlatl90RaBtDkK/w7CYhuRUEO0ee3l+J3m55Vm+17vtwjTnV1V3QA8qfbeUXCzRWDpiLLS+OyzvRW7IzW9R+okvclsqR09743bo0yUpc1+lSJvNsa002+Euk9GKzV7SmZDRIMiaFAEDYqgQRE0KIIGRdCgCBoUQeMEMERadX7YUz8AAAAASUVORK5CYII=";
|
1661
|
+
function xa(t) {
|
1628
1662
|
return "items" in t;
|
1629
1663
|
}
|
1630
|
-
function
|
1631
|
-
function n(e,
|
1632
|
-
console.log("onChange:", e,
|
1664
|
+
function Le(t) {
|
1665
|
+
function n(e, r) {
|
1666
|
+
console.log("onChange:", e, r);
|
1633
1667
|
}
|
1634
1668
|
const a = [];
|
1635
1669
|
return t.items.forEach((e) => {
|
1636
|
-
|
1637
|
-
/* @__PURE__ */
|
1670
|
+
xa(e) ? a.push(
|
1671
|
+
/* @__PURE__ */ u.jsx(Le, { title: e.title, items: e.items }, Math.random())
|
1638
1672
|
) : a.push(
|
1639
|
-
/* @__PURE__ */
|
1640
|
-
|
1673
|
+
/* @__PURE__ */ u.jsx(
|
1674
|
+
at,
|
1641
1675
|
{
|
1642
1676
|
title: e.title,
|
1643
1677
|
prop: e.prop,
|
@@ -1647,19 +1681,19 @@ function $e(t) {
|
|
1647
1681
|
max: e.max,
|
1648
1682
|
step: e.step,
|
1649
1683
|
disabled: e.disabled,
|
1650
|
-
onChange: (
|
1651
|
-
e.onChange !== void 0 ? e.onChange(
|
1684
|
+
onChange: (r, s) => {
|
1685
|
+
e.onChange !== void 0 ? e.onChange(r, s) : n(r, s);
|
1652
1686
|
}
|
1653
1687
|
},
|
1654
1688
|
Math.random()
|
1655
1689
|
)
|
1656
1690
|
);
|
1657
|
-
}), /* @__PURE__ */
|
1691
|
+
}), /* @__PURE__ */ u.jsx(Lt, { label: t.title, open: !1, children: a });
|
1658
1692
|
}
|
1659
|
-
function
|
1693
|
+
function wa(t) {
|
1660
1694
|
return !(t === "alphaHash" || t === "alphaToCoverage" || t === "attenuationDistance" || t === "colorWrite" || t === "combine" || t === "defaultAttributeValues" || t === "depthFunc" || t === "forceSinglePass" || t === "glslVersion" || t === "linewidth" || t === "normalMapType" || t === "precision" || t === "premultipliedAlpha" || t === "shadowSide" || t === "side" || t === "toneMapped" || t === "uniformsGroups" || t === "uniformsNeedUpdate" || t === "userData" || t === "vertexColors" || t === "version" || t === "wireframeLinecap" || t === "wireframeLinejoin" || t === "wireframeLinewidth" || t.slice(0, 5) === "blend" || t.slice(0, 4) === "clip" || t.slice(0, 7) === "polygon" || t.slice(0, 7) === "stencil" || t.slice(0, 2) === "is");
|
1661
1695
|
}
|
1662
|
-
function
|
1696
|
+
function _e(t) {
|
1663
1697
|
switch (t) {
|
1664
1698
|
case "alphaMap":
|
1665
1699
|
return "Alpha Map";
|
@@ -1808,81 +1842,81 @@ function Oe(t) {
|
|
1808
1842
|
}
|
1809
1843
|
return t;
|
1810
1844
|
}
|
1811
|
-
function
|
1845
|
+
function Ca(t) {
|
1812
1846
|
return t.toLowerCase().search("intensity") > -1 || t === "anisotropyRotation" || t === "bumpScale" || t === "clearcoatRoughness" || t === "displacementBias" || t === "displacementScale" || t === "metalness" || t === "opacity" || t === "reflectivity" || t === "refractionRatio" || t === "roughness" || t === "sheenRoughness" || t === "thickness";
|
1813
1847
|
}
|
1814
|
-
function
|
1848
|
+
function Sa() {
|
1815
1849
|
const t = document.createElement("input");
|
1816
1850
|
return t.type = "file", new Promise((n, a) => {
|
1817
1851
|
t.addEventListener("change", function() {
|
1818
1852
|
if (t.files === null)
|
1819
1853
|
a();
|
1820
1854
|
else {
|
1821
|
-
const e = t.files[0],
|
1822
|
-
|
1823
|
-
n(
|
1824
|
-
},
|
1855
|
+
const e = t.files[0], r = new FileReader();
|
1856
|
+
r.onload = function(s) {
|
1857
|
+
n(s.target.result);
|
1858
|
+
}, r.readAsDataURL(e);
|
1825
1859
|
}
|
1826
1860
|
}), t.click();
|
1827
1861
|
});
|
1828
1862
|
}
|
1829
|
-
function
|
1863
|
+
function Kt(t, n, a) {
|
1830
1864
|
const e = [];
|
1831
|
-
for (const
|
1832
|
-
if (!
|
1865
|
+
for (const r in t) {
|
1866
|
+
if (!wa(r))
|
1833
1867
|
continue;
|
1834
|
-
const
|
1835
|
-
if (
|
1836
|
-
const
|
1837
|
-
title:
|
1838
|
-
prop:
|
1839
|
-
type:
|
1868
|
+
const s = typeof t[r], c = t[r];
|
1869
|
+
if (s === "boolean" || s === "number" || s === "string") {
|
1870
|
+
const l = {
|
1871
|
+
title: _e(r),
|
1872
|
+
prop: r,
|
1873
|
+
type: s,
|
1840
1874
|
value: c,
|
1841
1875
|
min: void 0,
|
1842
1876
|
max: void 0,
|
1843
1877
|
onChange: (d, p) => {
|
1844
1878
|
var b;
|
1845
|
-
a.updateObject(n.uuid, `material.${d}`, p),
|
1846
|
-
const
|
1847
|
-
|
1879
|
+
a.updateObject(n.uuid, `material.${d}`, p), s === "boolean" && a.updateObject(n.uuid, "material.needsUpdate", !0);
|
1880
|
+
const m = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
|
1881
|
+
m !== void 0 && ee(m, `material.${d}`, p);
|
1848
1882
|
}
|
1849
1883
|
};
|
1850
|
-
|
1851
|
-
} else if (
|
1884
|
+
Ca(r) && (l.value = Number(c), l.type = "range", l.min = 0, l.max = 1, l.step = 0.01), e.push(l);
|
1885
|
+
} else if (s === "object")
|
1852
1886
|
if (c.isColor)
|
1853
1887
|
e.push({
|
1854
|
-
title:
|
1855
|
-
prop:
|
1888
|
+
title: _e(r),
|
1889
|
+
prop: r,
|
1856
1890
|
type: "color",
|
1857
1891
|
value: c,
|
1858
|
-
onChange: (
|
1892
|
+
onChange: (l, d) => {
|
1859
1893
|
var b;
|
1860
|
-
const p = new
|
1861
|
-
a.updateObject(n.uuid, `material.${
|
1862
|
-
const
|
1863
|
-
|
1894
|
+
const p = new Nt(d);
|
1895
|
+
a.updateObject(n.uuid, `material.${l}`, p);
|
1896
|
+
const m = (b = a.scene) == null ? void 0 : b.getObjectByProperty("uuid", n.uuid);
|
1897
|
+
m !== void 0 && ee(m, `material.${l}`, p);
|
1864
1898
|
}
|
1865
1899
|
});
|
1866
1900
|
else if (Array.isArray(c)) {
|
1867
|
-
const
|
1901
|
+
const l = [];
|
1868
1902
|
for (const d in c)
|
1869
|
-
|
1903
|
+
l.push({
|
1870
1904
|
title: `${d}`,
|
1871
1905
|
type: `${typeof c[d]}`,
|
1872
1906
|
value: c[d],
|
1873
|
-
onChange: (p,
|
1907
|
+
onChange: (p, m) => {
|
1874
1908
|
var x;
|
1875
|
-
a.updateObject(n.uuid, `material.${
|
1909
|
+
a.updateObject(n.uuid, `material.${r}`, m);
|
1876
1910
|
const b = (x = a.scene) == null ? void 0 : x.getObjectByProperty("uuid", n.uuid);
|
1877
|
-
b !== void 0 &&
|
1911
|
+
b !== void 0 && ee(b, `material.${r}`, m);
|
1878
1912
|
}
|
1879
1913
|
});
|
1880
1914
|
e.push({
|
1881
|
-
title:
|
1882
|
-
items:
|
1915
|
+
title: _e(r),
|
1916
|
+
items: l
|
1883
1917
|
});
|
1884
1918
|
} else {
|
1885
|
-
const
|
1919
|
+
const l = [];
|
1886
1920
|
for (const d in c) {
|
1887
1921
|
const p = c[d];
|
1888
1922
|
switch (typeof p) {
|
@@ -1890,66 +1924,66 @@ function Vt(t, n, a) {
|
|
1890
1924
|
case "number":
|
1891
1925
|
case "string":
|
1892
1926
|
d === "src" ? e.push({
|
1893
|
-
title:
|
1927
|
+
title: _e(r),
|
1894
1928
|
type: "image",
|
1895
1929
|
value: p,
|
1896
1930
|
onChange: (b, x) => {
|
1897
|
-
var
|
1898
|
-
a.createTexture(n.uuid, `material.${
|
1899
|
-
const
|
1900
|
-
|
1901
|
-
|
1931
|
+
var S;
|
1932
|
+
a.createTexture(n.uuid, `material.${r}`, x);
|
1933
|
+
const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
|
1934
|
+
C !== void 0 && Dt(x).then((F) => {
|
1935
|
+
ee(C, `material.${r}`, F), ee(C, "material.needsUpdate", !0);
|
1902
1936
|
});
|
1903
1937
|
}
|
1904
|
-
}) :
|
1905
|
-
title: `${
|
1906
|
-
prop: `material.${
|
1907
|
-
type: `${typeof t[
|
1938
|
+
}) : l.push({
|
1939
|
+
title: `${_e(d)}`,
|
1940
|
+
prop: `material.${r}.${d}`,
|
1941
|
+
type: `${typeof t[r][d]}`,
|
1908
1942
|
value: c[d],
|
1909
1943
|
onChange: (b, x) => {
|
1910
|
-
var
|
1911
|
-
a.updateObject(n.uuid, `material.${
|
1912
|
-
const
|
1913
|
-
|
1944
|
+
var S;
|
1945
|
+
a.updateObject(n.uuid, `material.${r}.${d}`, x);
|
1946
|
+
const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
|
1947
|
+
C !== void 0 && ee(C, `material.${r}.${d}`, x);
|
1914
1948
|
}
|
1915
1949
|
});
|
1916
1950
|
break;
|
1917
1951
|
case "object":
|
1918
|
-
p.value !== void 0 && p.value.src !== void 0 ?
|
1919
|
-
title:
|
1952
|
+
p.value !== void 0 && p.value.src !== void 0 ? l.push({
|
1953
|
+
title: _e(d),
|
1920
1954
|
type: "image",
|
1921
1955
|
value: p.value.src,
|
1922
1956
|
onChange: (b, x) => {
|
1923
|
-
var
|
1924
|
-
a.createTexture(n.uuid, `material.${
|
1925
|
-
const
|
1926
|
-
|
1927
|
-
|
1957
|
+
var S;
|
1958
|
+
a.createTexture(n.uuid, `material.${r}.${d}.value`, x);
|
1959
|
+
const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
|
1960
|
+
C !== void 0 && Dt(x).then((F) => {
|
1961
|
+
ee(C, `material.${r}.${d}.value`, F);
|
1928
1962
|
});
|
1929
1963
|
}
|
1930
|
-
}) :
|
1964
|
+
}) : l.push({
|
1931
1965
|
title: d,
|
1932
1966
|
type: `${typeof p.value}`,
|
1933
1967
|
value: p.value,
|
1934
1968
|
onChange: (b, x) => {
|
1935
|
-
var
|
1936
|
-
a.updateObject(n.uuid, `material.${
|
1937
|
-
const
|
1938
|
-
|
1969
|
+
var S;
|
1970
|
+
a.updateObject(n.uuid, `material.${r}.${d}.value`, x);
|
1971
|
+
const C = (S = a.scene) == null ? void 0 : S.getObjectByProperty("uuid", n.uuid);
|
1972
|
+
C !== void 0 && ee(C, `material.${r}.${d}.value`, x);
|
1939
1973
|
}
|
1940
1974
|
});
|
1941
1975
|
break;
|
1942
1976
|
}
|
1943
1977
|
}
|
1944
|
-
|
1945
|
-
title:
|
1946
|
-
items:
|
1978
|
+
l.length > 0 && e.push({
|
1979
|
+
title: _e(r),
|
1980
|
+
items: l
|
1947
1981
|
});
|
1948
1982
|
}
|
1949
1983
|
else
|
1950
|
-
c !== void 0 && console.log("other:",
|
1984
|
+
c !== void 0 && console.log("other:", r, s, c);
|
1951
1985
|
}
|
1952
|
-
return e.sort((
|
1986
|
+
return e.sort((r, s) => r.title < s.title ? -1 : r.title > s.title ? 1 : 0), e.push({
|
1953
1987
|
title: "Update Material",
|
1954
1988
|
type: "button",
|
1955
1989
|
onChange: () => {
|
@@ -1957,63 +1991,63 @@ function Vt(t, n, a) {
|
|
1957
1991
|
}
|
1958
1992
|
}), e;
|
1959
1993
|
}
|
1960
|
-
function
|
1994
|
+
function Oa(t, n) {
|
1961
1995
|
const a = t.material;
|
1962
1996
|
if (Array.isArray(a)) {
|
1963
|
-
const e = [],
|
1964
|
-
for (let
|
1997
|
+
const e = [], r = a.length;
|
1998
|
+
for (let s = 0; s < r; s++)
|
1965
1999
|
e.push(
|
1966
|
-
/* @__PURE__ */
|
1967
|
-
|
2000
|
+
/* @__PURE__ */ u.jsx(
|
2001
|
+
Le,
|
1968
2002
|
{
|
1969
|
-
title: `Material ${
|
1970
|
-
items:
|
2003
|
+
title: `Material ${s}`,
|
2004
|
+
items: Kt(a[s], t, n)
|
1971
2005
|
},
|
1972
|
-
`Material ${
|
2006
|
+
`Material ${s}`
|
1973
2007
|
)
|
1974
2008
|
);
|
1975
|
-
return /* @__PURE__ */
|
2009
|
+
return /* @__PURE__ */ u.jsx(u.Fragment, { children: e });
|
1976
2010
|
} else
|
1977
|
-
return /* @__PURE__ */
|
1978
|
-
|
2011
|
+
return /* @__PURE__ */ u.jsx(
|
2012
|
+
Le,
|
1979
2013
|
{
|
1980
2014
|
title: "Material",
|
1981
|
-
items:
|
2015
|
+
items: Kt(a, t, n)
|
1982
2016
|
}
|
1983
2017
|
);
|
1984
2018
|
}
|
1985
|
-
function
|
2019
|
+
function at(t) {
|
1986
2020
|
let n = t.value;
|
1987
|
-
n !== void 0 && n.isColor !== void 0 && (n =
|
1988
|
-
const [a, e] =
|
1989
|
-
|
1990
|
-
var
|
1991
|
-
let
|
1992
|
-
const
|
1993
|
-
|
1994
|
-
},
|
1995
|
-
if (!
|
2021
|
+
n !== void 0 && n.isColor !== void 0 && (n = Jn(t.value));
|
2022
|
+
const [a, e] = ie(n), r = xe(null), s = xe(null), c = xe(null);
|
2023
|
+
Ne(() => {
|
2024
|
+
var K;
|
2025
|
+
let m = !1, b = -1, x = 0, C = Number(a);
|
2026
|
+
const S = (de) => {
|
2027
|
+
m = !0, x = C, b = de.clientX;
|
2028
|
+
}, F = (de) => {
|
2029
|
+
if (!m)
|
1996
2030
|
return;
|
1997
|
-
const
|
1998
|
-
|
1999
|
-
},
|
2000
|
-
|
2001
|
-
},
|
2002
|
-
|
2003
|
-
},
|
2004
|
-
return
|
2005
|
-
var
|
2006
|
-
|
2031
|
+
const ce = t.step !== void 0 ? t.step : 1, te = (de.clientX - b) * ce;
|
2032
|
+
C = Number((x + te).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);
|
2033
|
+
}, Q = () => {
|
2034
|
+
m = !1;
|
2035
|
+
}, H = () => {
|
2036
|
+
m = !1;
|
2037
|
+
}, O = t.type === "number";
|
2038
|
+
return O && ((K = r.current) == null || K.addEventListener("mousedown", S, !1), document.addEventListener("mouseup", Q, !1), document.addEventListener("mousemove", F, !1), document.addEventListener("contextmenu", H, !1)), () => {
|
2039
|
+
var de;
|
2040
|
+
O && ((de = r.current) == null || de.removeEventListener("mousedown", S), document.removeEventListener("mouseup", Q), document.removeEventListener("mousemove", F), document.removeEventListener("contextmenu", H));
|
2007
2041
|
};
|
2008
2042
|
}, [a]);
|
2009
|
-
const
|
2010
|
-
`) > -1), d =
|
2011
|
-
let b =
|
2012
|
-
t.type === "boolean" && (b =
|
2043
|
+
const l = t.type === "string" && (a.length > 100 || a.search(`
|
2044
|
+
`) > -1), d = l || t.type === "image", p = (m) => {
|
2045
|
+
let b = m.target.value;
|
2046
|
+
t.type === "boolean" && (b = m.target.checked), e(b), t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, b);
|
2013
2047
|
};
|
2014
|
-
return /* @__PURE__ */
|
2015
|
-
t.type !== "button" && /* @__PURE__ */
|
2016
|
-
t.type === "string" && !
|
2048
|
+
return /* @__PURE__ */ u.jsxs("div", { className: `field ${d ? "block" : ""}`, children: [
|
2049
|
+
t.type !== "button" && /* @__PURE__ */ u.jsx("label", { ref: r, children: t.title }, "fieldLabel"),
|
2050
|
+
t.type === "string" && !l && /* @__PURE__ */ u.jsx(
|
2017
2051
|
"input",
|
2018
2052
|
{
|
2019
2053
|
type: "text",
|
@@ -2022,7 +2056,7 @@ function et(t) {
|
|
2022
2056
|
value: a
|
2023
2057
|
}
|
2024
2058
|
),
|
2025
|
-
t.type === "string" &&
|
2059
|
+
t.type === "string" && l && /* @__PURE__ */ u.jsx(
|
2026
2060
|
"textarea",
|
2027
2061
|
{
|
2028
2062
|
cols: 50,
|
@@ -2032,7 +2066,7 @@ function et(t) {
|
|
2032
2066
|
value: a
|
2033
2067
|
}
|
2034
2068
|
),
|
2035
|
-
t.type === "boolean" && /* @__PURE__ */
|
2069
|
+
t.type === "boolean" && /* @__PURE__ */ u.jsx(
|
2036
2070
|
"input",
|
2037
2071
|
{
|
2038
2072
|
type: "checkbox",
|
@@ -2041,10 +2075,10 @@ function et(t) {
|
|
2041
2075
|
checked: a
|
2042
2076
|
}
|
2043
2077
|
),
|
2044
|
-
t.type === "number" && /* @__PURE__ */
|
2078
|
+
t.type === "number" && /* @__PURE__ */ u.jsx(
|
2045
2079
|
"input",
|
2046
2080
|
{
|
2047
|
-
ref:
|
2081
|
+
ref: s,
|
2048
2082
|
type: "number",
|
2049
2083
|
value: a,
|
2050
2084
|
min: t.min,
|
@@ -2053,9 +2087,9 @@ function et(t) {
|
|
2053
2087
|
onChange: p
|
2054
2088
|
}
|
2055
2089
|
),
|
2056
|
-
t.type === "range" && /* @__PURE__ */
|
2057
|
-
/* @__PURE__ */
|
2058
|
-
/* @__PURE__ */
|
2090
|
+
t.type === "range" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
2091
|
+
/* @__PURE__ */ u.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "min" }),
|
2092
|
+
/* @__PURE__ */ u.jsx(
|
2059
2093
|
"input",
|
2060
2094
|
{
|
2061
2095
|
disabled: t.disabled,
|
@@ -2068,11 +2102,11 @@ function et(t) {
|
|
2068
2102
|
}
|
2069
2103
|
)
|
2070
2104
|
] }),
|
2071
|
-
t.type === "color" && /* @__PURE__ */
|
2072
|
-
/* @__PURE__ */
|
2073
|
-
/* @__PURE__ */
|
2105
|
+
t.type === "color" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
2106
|
+
/* @__PURE__ */ u.jsx("input", { type: "text", value: a.toString(), onChange: p, className: "color" }),
|
2107
|
+
/* @__PURE__ */ u.jsx("input", { type: "color", value: a, onChange: p })
|
2074
2108
|
] }),
|
2075
|
-
t.type === "button" && /* @__PURE__ */
|
2109
|
+
t.type === "button" && /* @__PURE__ */ u.jsx(
|
2076
2110
|
"button",
|
2077
2111
|
{
|
2078
2112
|
onClick: () => {
|
@@ -2081,14 +2115,14 @@ function et(t) {
|
|
2081
2115
|
children: t.title
|
2082
2116
|
}
|
2083
2117
|
),
|
2084
|
-
t.type === "image" && /* @__PURE__ */
|
2085
|
-
|
2086
|
-
c.current.src =
|
2118
|
+
t.type === "image" && /* @__PURE__ */ u.jsx("img", { ref: c, onClick: () => {
|
2119
|
+
Sa().then((m) => {
|
2120
|
+
c.current.src = m, t.onChange !== void 0 && t.onChange(t.prop !== void 0 ? t.prop : t.title, m);
|
2087
2121
|
});
|
2088
|
-
}, src: a.length > 0 ? a :
|
2122
|
+
}, src: a.length > 0 ? a : Ea })
|
2089
2123
|
] });
|
2090
2124
|
}
|
2091
|
-
function
|
2125
|
+
function Xt(t) {
|
2092
2126
|
switch (t) {
|
2093
2127
|
case "fov":
|
2094
2128
|
return "FOV";
|
@@ -2117,68 +2151,71 @@ function Yt(t) {
|
|
2117
2151
|
}
|
2118
2152
|
return t;
|
2119
2153
|
}
|
2120
|
-
function
|
2154
|
+
function Ta(t, n) {
|
2121
2155
|
const a = [];
|
2122
2156
|
if (t.perspectiveCameraInfo !== void 0)
|
2123
2157
|
for (const e in t.perspectiveCameraInfo)
|
2124
2158
|
a.push({
|
2125
|
-
title:
|
2159
|
+
title: Xt(e),
|
2126
2160
|
prop: e,
|
2127
2161
|
type: "number",
|
2128
2162
|
step: 0.01,
|
2129
2163
|
value: t.perspectiveCameraInfo[e],
|
2130
|
-
onChange: (
|
2131
|
-
var
|
2132
|
-
n.updateObject(t.uuid,
|
2133
|
-
const c = (
|
2134
|
-
c !== void 0 && (
|
2164
|
+
onChange: (r, s) => {
|
2165
|
+
var l;
|
2166
|
+
n.updateObject(t.uuid, r, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2167
|
+
const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
|
2168
|
+
c !== void 0 && (ee(c, r, s), c.updateProjectionMatrix());
|
2135
2169
|
}
|
2136
2170
|
});
|
2137
2171
|
else if (t.orthographicCameraInfo !== void 0)
|
2138
2172
|
for (const e in t.orthographicCameraInfo)
|
2139
2173
|
a.push({
|
2140
|
-
title:
|
2174
|
+
title: Xt(e),
|
2141
2175
|
prop: e,
|
2142
2176
|
type: "number",
|
2143
2177
|
step: 0.01,
|
2144
2178
|
value: t.perspectiveCameraInfo[e],
|
2145
|
-
onChange: (
|
2146
|
-
var
|
2147
|
-
n.updateObject(t.uuid,
|
2148
|
-
const c = (
|
2149
|
-
c !== void 0 && (
|
2179
|
+
onChange: (r, s) => {
|
2180
|
+
var l;
|
2181
|
+
n.updateObject(t.uuid, r, s), n.requestMethod(t.uuid, "updateProjectionMatrix");
|
2182
|
+
const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
|
2183
|
+
c !== void 0 && (ee(c, r, s), c.updateProjectionMatrix());
|
2150
2184
|
}
|
2151
2185
|
});
|
2152
|
-
return /* @__PURE__ */
|
2153
|
-
|
2186
|
+
return /* @__PURE__ */ u.jsx(
|
2187
|
+
Le,
|
2154
2188
|
{
|
2155
2189
|
title: "Camera",
|
2156
2190
|
items: a
|
2157
2191
|
}
|
2158
2192
|
);
|
2159
2193
|
}
|
2160
|
-
const
|
2161
|
-
function
|
2162
|
-
return t *
|
2194
|
+
const Ma = Math.PI / 180, Ra = 180 / Math.PI;
|
2195
|
+
function We(t, n, a, e, r) {
|
2196
|
+
return e + (t - n) * (r - e) / (a - n);
|
2163
2197
|
}
|
2164
|
-
function
|
2165
|
-
return t *
|
2198
|
+
function Pa(t) {
|
2199
|
+
return t * Ma;
|
2166
2200
|
}
|
2167
|
-
function
|
2168
|
-
|
2201
|
+
function jt(t) {
|
2202
|
+
return t * Ra;
|
2203
|
+
}
|
2204
|
+
function ja(t, n) {
|
2205
|
+
const a = new kn();
|
2169
2206
|
a.elements = t.matrix;
|
2170
|
-
const e = new
|
2171
|
-
t.uuid.length > 0 && (e.setFromMatrixPosition(a),
|
2207
|
+
const e = new Y(), r = new An(), s = new Y();
|
2208
|
+
t.uuid.length > 0 && (e.setFromMatrixPosition(a), r.setFromRotationMatrix(a), s.setFromMatrixScale(a));
|
2172
2209
|
const c = (d, p) => {
|
2173
2210
|
var b;
|
2174
2211
|
n.updateObject(t.uuid, d, p);
|
2175
|
-
const
|
2176
|
-
|
2177
|
-
},
|
2178
|
-
c(d,
|
2212
|
+
const m = (b = n.scene) == null ? void 0 : b.getObjectByProperty("uuid", t.uuid);
|
2213
|
+
m !== void 0 && ee(m, d, p);
|
2214
|
+
}, l = (d, p) => {
|
2215
|
+
c(d, Pa(p));
|
2179
2216
|
};
|
2180
|
-
return /* @__PURE__ */
|
2181
|
-
|
2217
|
+
return /* @__PURE__ */ u.jsx(
|
2218
|
+
Le,
|
2182
2219
|
{
|
2183
2220
|
title: "Transform",
|
2184
2221
|
items: [
|
@@ -2207,37 +2244,37 @@ function Ca(t, n) {
|
|
2207
2244
|
title: "Rotation X",
|
2208
2245
|
prop: "rotation.x",
|
2209
2246
|
type: "number",
|
2210
|
-
value:
|
2247
|
+
value: Rt(jt(r.x)),
|
2211
2248
|
min: -360,
|
2212
2249
|
max: 360,
|
2213
2250
|
step: 0.1,
|
2214
|
-
onChange:
|
2251
|
+
onChange: l
|
2215
2252
|
},
|
2216
2253
|
{
|
2217
2254
|
title: "Rotation Y",
|
2218
2255
|
prop: "rotation.y",
|
2219
2256
|
type: "number",
|
2220
|
-
value:
|
2257
|
+
value: Rt(jt(r.y)),
|
2221
2258
|
min: -360,
|
2222
2259
|
max: 360,
|
2223
2260
|
step: 0.1,
|
2224
|
-
onChange:
|
2261
|
+
onChange: l
|
2225
2262
|
},
|
2226
2263
|
{
|
2227
2264
|
title: "Rotation Z",
|
2228
2265
|
prop: "rotation.z",
|
2229
2266
|
type: "number",
|
2230
|
-
value:
|
2267
|
+
value: Rt(jt(r.z)),
|
2231
2268
|
min: -360,
|
2232
2269
|
max: 360,
|
2233
2270
|
step: 0.1,
|
2234
|
-
onChange:
|
2271
|
+
onChange: l
|
2235
2272
|
},
|
2236
2273
|
{
|
2237
2274
|
title: "Scale X",
|
2238
2275
|
prop: "scale.x",
|
2239
2276
|
type: "number",
|
2240
|
-
value:
|
2277
|
+
value: s.x,
|
2241
2278
|
step: 0.01,
|
2242
2279
|
onChange: c
|
2243
2280
|
},
|
@@ -2245,7 +2282,7 @@ function Ca(t, n) {
|
|
2245
2282
|
title: "Scale Y",
|
2246
2283
|
prop: "scale.y",
|
2247
2284
|
type: "number",
|
2248
|
-
value:
|
2285
|
+
value: s.y,
|
2249
2286
|
step: 0.01,
|
2250
2287
|
onChange: c
|
2251
2288
|
},
|
@@ -2253,7 +2290,7 @@ function Ca(t, n) {
|
|
2253
2290
|
title: "Scale Z",
|
2254
2291
|
prop: "scale.z",
|
2255
2292
|
type: "number",
|
2256
|
-
value:
|
2293
|
+
value: s.z,
|
2257
2294
|
step: 0.01,
|
2258
2295
|
onChange: c
|
2259
2296
|
}
|
@@ -2261,7 +2298,7 @@ function Ca(t, n) {
|
|
2261
2298
|
}
|
2262
2299
|
);
|
2263
2300
|
}
|
2264
|
-
function
|
2301
|
+
function qt(t) {
|
2265
2302
|
switch (t) {
|
2266
2303
|
case "color":
|
2267
2304
|
return "Color";
|
@@ -2280,71 +2317,120 @@ function zt(t) {
|
|
2280
2317
|
}
|
2281
2318
|
return t;
|
2282
2319
|
}
|
2283
|
-
function
|
2320
|
+
function _a(t, n) {
|
2284
2321
|
const a = [];
|
2285
2322
|
if (t.lightInfo !== void 0)
|
2286
2323
|
for (const e in t.lightInfo) {
|
2287
|
-
const
|
2288
|
-
|
2289
|
-
title:
|
2324
|
+
const r = t.lightInfo[e];
|
2325
|
+
r !== void 0 && (r.isColor !== void 0 ? a.push({
|
2326
|
+
title: qt(e),
|
2290
2327
|
prop: e,
|
2291
2328
|
type: "color",
|
2292
|
-
value:
|
2293
|
-
onChange: (
|
2329
|
+
value: r,
|
2330
|
+
onChange: (s, c) => {
|
2294
2331
|
var p;
|
2295
|
-
const
|
2296
|
-
n.updateObject(t.uuid,
|
2332
|
+
const l = new Nt(c);
|
2333
|
+
n.updateObject(t.uuid, s, l);
|
2297
2334
|
const d = (p = n.scene) == null ? void 0 : p.getObjectByProperty("uuid", t.uuid);
|
2298
|
-
d !== void 0 &&
|
2335
|
+
d !== void 0 && ee(d, s, l);
|
2299
2336
|
}
|
2300
2337
|
}) : a.push({
|
2301
|
-
title:
|
2338
|
+
title: qt(e),
|
2302
2339
|
prop: e,
|
2303
|
-
type: typeof
|
2304
|
-
value:
|
2305
|
-
step: typeof
|
2306
|
-
onChange: (
|
2340
|
+
type: typeof r,
|
2341
|
+
value: r,
|
2342
|
+
step: typeof r == "number" ? 0.01 : void 0,
|
2343
|
+
onChange: (s, c) => {
|
2307
2344
|
var d;
|
2308
|
-
n.updateObject(t.uuid,
|
2309
|
-
const
|
2310
|
-
|
2345
|
+
n.updateObject(t.uuid, s, c);
|
2346
|
+
const l = (d = n.scene) == null ? void 0 : d.getObjectByProperty("uuid", t.uuid);
|
2347
|
+
l !== void 0 && ee(l, s, c);
|
2311
2348
|
}
|
2312
2349
|
}));
|
2313
2350
|
}
|
2314
|
-
return /* @__PURE__ */
|
2315
|
-
|
2351
|
+
return /* @__PURE__ */ u.jsx(
|
2352
|
+
Le,
|
2316
2353
|
{
|
2317
2354
|
title: "Light",
|
2318
2355
|
items: a
|
2319
2356
|
}
|
2320
2357
|
);
|
2321
2358
|
}
|
2322
|
-
function
|
2323
|
-
const
|
2359
|
+
function ka(t, n) {
|
2360
|
+
const a = [];
|
2361
|
+
return t.animations.forEach((e) => {
|
2362
|
+
a.push({
|
2363
|
+
title: "Name",
|
2364
|
+
type: "string",
|
2365
|
+
prop: "name",
|
2366
|
+
value: e.name,
|
2367
|
+
disabled: !0,
|
2368
|
+
onChange: (r, s) => {
|
2369
|
+
var l;
|
2370
|
+
n.updateObject(t.uuid, r, s);
|
2371
|
+
const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
|
2372
|
+
c !== void 0 && ee(c, r, s);
|
2373
|
+
}
|
2374
|
+
}), a.push({
|
2375
|
+
title: "Duration",
|
2376
|
+
type: "number",
|
2377
|
+
prop: "duration",
|
2378
|
+
value: e.duration,
|
2379
|
+
disabled: !0,
|
2380
|
+
onChange: (r, s) => {
|
2381
|
+
var l;
|
2382
|
+
n.updateObject(t.uuid, r, s);
|
2383
|
+
const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
|
2384
|
+
c !== void 0 && ee(c, r, s);
|
2385
|
+
}
|
2386
|
+
}), a.push({
|
2387
|
+
title: "Blend Mode",
|
2388
|
+
type: "number",
|
2389
|
+
prop: "blendMode",
|
2390
|
+
value: e.blendMode,
|
2391
|
+
disabled: !0,
|
2392
|
+
onChange: (r, s) => {
|
2393
|
+
var l;
|
2394
|
+
n.updateObject(t.uuid, r, s);
|
2395
|
+
const c = (l = n.scene) == null ? void 0 : l.getObjectByProperty("uuid", t.uuid);
|
2396
|
+
c !== void 0 && ee(c, r, s);
|
2397
|
+
}
|
2398
|
+
});
|
2399
|
+
}), /* @__PURE__ */ u.jsx(Le, { title: "Animations", items: a });
|
2400
|
+
}
|
2401
|
+
function Aa(t) {
|
2402
|
+
const [n, a] = ie(-1), [e, r] = ie({
|
2324
2403
|
name: "",
|
2325
2404
|
uuid: "",
|
2326
2405
|
type: "",
|
2327
2406
|
visible: !1,
|
2328
2407
|
matrix: [1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1],
|
2408
|
+
animations: [],
|
2329
2409
|
material: void 0,
|
2330
2410
|
perspectiveCameraInfo: void 0,
|
2331
2411
|
orthographicCameraInfo: void 0,
|
2332
2412
|
lightInfo: void 0
|
2333
2413
|
});
|
2334
|
-
|
2335
|
-
function c(
|
2336
|
-
const d =
|
2337
|
-
|
2414
|
+
Ne(() => {
|
2415
|
+
function c(l) {
|
2416
|
+
const d = l.value;
|
2417
|
+
if (r(d), a(Date.now()), t.three.scene !== void 0) {
|
2418
|
+
const p = t.three.scene.getObjectByProperty("uuid", d.uuid);
|
2419
|
+
if (p !== void 0 && p.animations.length > 0) {
|
2420
|
+
const m = new Dn(p);
|
2421
|
+
console.log(m), console.log(p.animations);
|
2422
|
+
}
|
2423
|
+
}
|
2338
2424
|
}
|
2339
|
-
return
|
2340
|
-
|
2425
|
+
return k.addEventListener(A.SET_OBJECT, c), () => {
|
2426
|
+
k.removeEventListener(A.SET_OBJECT, c);
|
2341
2427
|
};
|
2342
2428
|
}, []);
|
2343
|
-
const
|
2344
|
-
return /* @__PURE__ */
|
2345
|
-
/* @__PURE__ */
|
2346
|
-
/* @__PURE__ */
|
2347
|
-
|
2429
|
+
const s = e.type.toLowerCase();
|
2430
|
+
return /* @__PURE__ */ u.jsx(Lt, { label: "Inspector", children: /* @__PURE__ */ u.jsx("div", { id: "Inspector", className: t.class, children: e.uuid.length > 0 && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
2431
|
+
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
2432
|
+
/* @__PURE__ */ u.jsx(
|
2433
|
+
at,
|
2348
2434
|
{
|
2349
2435
|
type: "string",
|
2350
2436
|
title: "Name",
|
@@ -2353,8 +2439,8 @@ function Oa(t) {
|
|
2353
2439
|
disabled: !0
|
2354
2440
|
}
|
2355
2441
|
),
|
2356
|
-
/* @__PURE__ */
|
2357
|
-
|
2442
|
+
/* @__PURE__ */ u.jsx(
|
2443
|
+
at,
|
2358
2444
|
{
|
2359
2445
|
type: "string",
|
2360
2446
|
title: "Type",
|
@@ -2363,8 +2449,8 @@ function Oa(t) {
|
|
2363
2449
|
disabled: !0
|
2364
2450
|
}
|
2365
2451
|
),
|
2366
|
-
/* @__PURE__ */
|
2367
|
-
|
2452
|
+
/* @__PURE__ */ u.jsx(
|
2453
|
+
at,
|
2368
2454
|
{
|
2369
2455
|
type: "string",
|
2370
2456
|
title: "UUID",
|
@@ -2373,152 +2459,153 @@ function Oa(t) {
|
|
2373
2459
|
disabled: !0
|
2374
2460
|
}
|
2375
2461
|
),
|
2376
|
-
/* @__PURE__ */
|
2377
|
-
|
2462
|
+
/* @__PURE__ */ u.jsx(
|
2463
|
+
at,
|
2378
2464
|
{
|
2379
2465
|
type: "boolean",
|
2380
2466
|
title: "Visible",
|
2381
2467
|
prop: "visible",
|
2382
2468
|
value: e.visible,
|
2383
|
-
onChange: (c,
|
2469
|
+
onChange: (c, l) => {
|
2384
2470
|
var p;
|
2385
|
-
t.three.updateObject(e.uuid, c,
|
2471
|
+
t.three.updateObject(e.uuid, c, l);
|
2386
2472
|
const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", e.uuid);
|
2387
|
-
d !== void 0 &&
|
2473
|
+
d !== void 0 && ee(d, c, l);
|
2388
2474
|
}
|
2389
2475
|
}
|
2390
2476
|
)
|
2391
2477
|
] }),
|
2392
|
-
/* @__PURE__ */
|
2393
|
-
|
2394
|
-
|
2395
|
-
|
2396
|
-
|
2478
|
+
/* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
2479
|
+
ja(e, t.three),
|
2480
|
+
e.animations.length > 0 ? ka(e, t.three) : null,
|
2481
|
+
s.search("camera") > -1 ? Ta(e, t.three) : null,
|
2482
|
+
s.search("light") > -1 ? _a(e, t.three) : null,
|
2483
|
+
s.search("mesh") > -1 ? Oa(e, t.three) : null
|
2397
2484
|
] })
|
2398
|
-
] }) }, n);
|
2485
|
+
] }) }, n) }, "Inspector");
|
2399
2486
|
}
|
2400
|
-
class
|
2487
|
+
class ai extends Kn {
|
2401
2488
|
constructor(a) {
|
2402
2489
|
super(a);
|
2403
|
-
|
2490
|
+
Z(this, "three");
|
2404
2491
|
// Private
|
2405
|
-
|
2492
|
+
Z(this, "setScene", (a) => {
|
2406
2493
|
this.setState(() => ({
|
2407
2494
|
scene: a.value
|
2408
2495
|
}));
|
2409
2496
|
});
|
2410
2497
|
this.state = {
|
2411
2498
|
scene: a.scene !== void 0 ? a.scene : null
|
2412
|
-
}, this.three = a.three,
|
2499
|
+
}, this.three = a.three, k.addEventListener(A.SET_SCENE, this.setScene);
|
2413
2500
|
}
|
2414
2501
|
componentWillUnmount() {
|
2415
|
-
|
2502
|
+
k.removeEventListener(A.SET_SCENE, this.setScene);
|
2416
2503
|
}
|
2417
2504
|
render() {
|
2418
|
-
var
|
2419
|
-
const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(
|
2420
|
-
return /* @__PURE__ */
|
2421
|
-
/* @__PURE__ */
|
2422
|
-
/* @__PURE__ */
|
2423
|
-
] }) }, "
|
2505
|
+
var r;
|
2506
|
+
const a = this.componentState.scene !== null, e = "Hierarchy - " + (a ? `${(r = this.componentState.scene) == null ? void 0 : r.name}` : "No Scene");
|
2507
|
+
return /* @__PURE__ */ u.jsx("div", { id: "SidePanel", children: /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
2508
|
+
/* @__PURE__ */ u.jsx(Lt, { label: e, open: !0, children: /* @__PURE__ */ u.jsx(u.Fragment, { children: a && /* @__PURE__ */ u.jsx(ya, { child: this.componentState.scene, three: this.three }) }) }),
|
2509
|
+
/* @__PURE__ */ u.jsx(Aa, { three: this.three })
|
2510
|
+
] }) }, "SidePanel");
|
2424
2511
|
}
|
2425
2512
|
// Getters / Setters
|
2426
2513
|
get componentState() {
|
2427
2514
|
return this.state;
|
2428
2515
|
}
|
2429
2516
|
}
|
2430
|
-
function
|
2517
|
+
function ii(t) {
|
2431
2518
|
function n() {
|
2432
2519
|
return t.three.scene === void 0 ? (console.log("No scene:", t.three), !1) : !0;
|
2433
2520
|
}
|
2434
|
-
const a = (
|
2521
|
+
const a = (l) => {
|
2435
2522
|
var p;
|
2436
2523
|
if (!n())
|
2437
2524
|
return;
|
2438
|
-
const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid",
|
2525
|
+
const d = (p = t.three.scene) == null ? void 0 : p.getObjectByProperty("uuid", l.value);
|
2439
2526
|
d !== void 0 && t.three.setObject(d);
|
2440
|
-
}, e = (
|
2527
|
+
}, e = (l, d, p) => {
|
2441
2528
|
var b;
|
2442
2529
|
if (!n())
|
2443
2530
|
return;
|
2444
|
-
const
|
2445
|
-
|
2446
|
-
},
|
2531
|
+
const m = (b = t.three.scene) == null ? void 0 : b.getObjectByProperty("uuid", l);
|
2532
|
+
m !== void 0 && ee(m, d, p);
|
2533
|
+
}, r = (l) => {
|
2447
2534
|
if (!n())
|
2448
2535
|
return;
|
2449
|
-
const d =
|
2450
|
-
e(b, p,
|
2451
|
-
},
|
2536
|
+
const d = l.value, { key: p, value: m, uuid: b } = d;
|
2537
|
+
e(b, p, m);
|
2538
|
+
}, s = (l) => {
|
2452
2539
|
if (!n())
|
2453
2540
|
return;
|
2454
|
-
const d =
|
2455
|
-
|
2541
|
+
const d = l.value;
|
2542
|
+
Dt(d.value).then((p) => {
|
2456
2543
|
e(d.uuid, d.key, p), e(d.uuid, "material.needsUpdate", !0);
|
2457
2544
|
});
|
2458
|
-
}, c = (
|
2545
|
+
}, c = (l) => {
|
2459
2546
|
var x;
|
2460
2547
|
if (!n())
|
2461
2548
|
return;
|
2462
|
-
const { key: d, uuid: p, value:
|
2549
|
+
const { key: d, uuid: p, value: m } = l.value, b = (x = t.three.scene) == null ? void 0 : x.getObjectByProperty("uuid", p);
|
2463
2550
|
if (b !== void 0)
|
2464
2551
|
try {
|
2465
|
-
b[d](
|
2466
|
-
} catch (
|
2467
|
-
console.log("Error requesting method:"), console.log(
|
2552
|
+
b[d](m);
|
2553
|
+
} catch (C) {
|
2554
|
+
console.log("Error requesting method:"), console.log(C), console.log(d), console.log(m);
|
2468
2555
|
}
|
2469
2556
|
};
|
2470
|
-
return
|
2471
|
-
|
2557
|
+
return Ne(() => (k.addEventListener(A.GET_OBJECT, a), k.addEventListener(A.UPDATE_OBJECT, r), k.addEventListener(A.CREATE_TEXTURE, s), k.addEventListener(A.REQUEST_METHOD, c), () => {
|
2558
|
+
k.removeEventListener(A.GET_OBJECT, a), k.removeEventListener(A.UPDATE_OBJECT, r), k.removeEventListener(A.CREATE_TEXTURE, s), k.removeEventListener(A.REQUEST_METHOD, c);
|
2472
2559
|
}), []), null;
|
2473
2560
|
}
|
2474
|
-
const
|
2475
|
-
class
|
2561
|
+
const Zt = { type: "change" }, _t = { type: "start" }, Jt = { type: "end" }, vt = new In(), Qt = new Nn(), Da = Math.cos(70 * Ln.DEG2RAD);
|
2562
|
+
class Ia extends nn {
|
2476
2563
|
constructor(n, a) {
|
2477
|
-
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new
|
2478
|
-
return
|
2564
|
+
super(), this.object = n, this.domElement = a, this.domElement.style.touchAction = "none", this.enabled = !0, this.target = new Y(), this.cursor = new Y(), 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: ze.ROTATE, MIDDLE: ze.DOLLY, RIGHT: ze.PAN }, this.touches = { ONE: Ye.ROTATE, TWO: Ye.DOLLY_PAN }, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._domElementKeyEvents = null, this.getPolarAngle = function() {
|
2565
|
+
return l.phi;
|
2479
2566
|
}, this.getAzimuthalAngle = function() {
|
2480
|
-
return
|
2567
|
+
return l.theta;
|
2481
2568
|
}, this.getDistance = function() {
|
2482
2569
|
return this.object.position.distanceTo(this.target);
|
2483
|
-
}, this.listenToKeyEvents = function(
|
2484
|
-
|
2570
|
+
}, this.listenToKeyEvents = function(o) {
|
2571
|
+
o.addEventListener("keydown", Je), this._domElementKeyEvents = o;
|
2485
2572
|
}, this.stopListenToKeyEvents = function() {
|
2486
|
-
this._domElementKeyEvents.removeEventListener("keydown",
|
2573
|
+
this._domElementKeyEvents.removeEventListener("keydown", Je), this._domElementKeyEvents = null;
|
2487
2574
|
}, this.saveState = function() {
|
2488
2575
|
e.target0.copy(e.target), e.position0.copy(e.object.position), e.zoom0 = e.object.zoom;
|
2489
2576
|
}, this.reset = function() {
|
2490
|
-
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(
|
2577
|
+
e.target.copy(e.target0), e.object.position.copy(e.position0), e.object.zoom = e.zoom0, e.object.updateProjectionMatrix(), e.dispatchEvent(Zt), e.update(), s = r.NONE;
|
2491
2578
|
}, this.update = function() {
|
2492
|
-
const
|
2493
|
-
return function(
|
2494
|
-
const
|
2495
|
-
|
2496
|
-
let
|
2497
|
-
isFinite(
|
2498
|
-
let
|
2499
|
-
if (e.zoomToCursor &&
|
2500
|
-
let
|
2579
|
+
const o = new Y(), E = new Vt().setFromUnitVectors(n.up, new Y(0, 1, 0)), _ = E.clone().invert(), N = new Y(), ne = new Vt(), ve = new Y(), le = 2 * Math.PI;
|
2580
|
+
return function(gt = null) {
|
2581
|
+
const be = e.object.position;
|
2582
|
+
o.copy(be).sub(e.target), o.applyQuaternion(E), l.setFromVector3(o), e.autoRotate && s === r.NONE && V(y(gt)), e.enableDamping ? (l.theta += d.theta * e.dampingFactor, l.phi += d.phi * e.dampingFactor) : (l.theta += d.theta, l.phi += d.phi);
|
2583
|
+
let fe = e.minAzimuthAngle, he = e.maxAzimuthAngle;
|
2584
|
+
isFinite(fe) && isFinite(he) && (fe < -Math.PI ? fe += le : fe > Math.PI && (fe -= le), he < -Math.PI ? he += le : he > Math.PI && (he -= le), fe <= he ? l.theta = Math.max(fe, Math.min(he, l.theta)) : l.theta = l.theta > (fe + he) / 2 ? Math.max(fe, l.theta) : Math.min(he, l.theta)), l.phi = Math.max(e.minPolarAngle, Math.min(e.maxPolarAngle, l.phi)), l.makeSafe(), e.enableDamping === !0 ? e.target.addScaledVector(m, e.dampingFactor) : e.target.add(m), e.target.sub(e.cursor), e.target.clampLength(e.minTargetRadius, e.maxTargetRadius), e.target.add(e.cursor), e.zoomToCursor && te || e.object.isOrthographicCamera ? l.radius = X(l.radius) : l.radius = X(l.radius * p), o.setFromSpherical(l), o.applyQuaternion(_), be.copy(e.target).add(o), e.object.lookAt(e.target), e.enableDamping === !0 ? (d.theta *= 1 - e.dampingFactor, d.phi *= 1 - e.dampingFactor, m.multiplyScalar(1 - e.dampingFactor)) : (d.set(0, 0, 0), m.set(0, 0, 0));
|
2585
|
+
let $e = !1;
|
2586
|
+
if (e.zoomToCursor && te) {
|
2587
|
+
let je = null;
|
2501
2588
|
if (e.object.isPerspectiveCamera) {
|
2502
|
-
const
|
2503
|
-
|
2504
|
-
const
|
2505
|
-
e.object.position.addScaledVector(
|
2589
|
+
const Se = o.length();
|
2590
|
+
je = X(Se * p);
|
2591
|
+
const Ge = Se - je;
|
2592
|
+
e.object.position.addScaledVector(de, Ge), e.object.updateMatrixWorld();
|
2506
2593
|
} else if (e.object.isOrthographicCamera) {
|
2507
|
-
const
|
2508
|
-
|
2509
|
-
const
|
2510
|
-
|
2594
|
+
const Se = new Y(ce.x, ce.y, 0);
|
2595
|
+
Se.unproject(e.object), e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), $e = !0;
|
2596
|
+
const Ge = new Y(ce.x, ce.y, 0);
|
2597
|
+
Ge.unproject(e.object), e.object.position.sub(Ge).add(Se), e.object.updateMatrixWorld(), je = o.length();
|
2511
2598
|
} else
|
2512
2599
|
console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), e.zoomToCursor = !1;
|
2513
|
-
|
2600
|
+
je !== null && (this.screenSpacePanning ? e.target.set(0, 0, -1).transformDirection(e.object.matrix).multiplyScalar(je).add(e.object.position) : (vt.origin.copy(e.object.position), vt.direction.set(0, 0, -1).transformDirection(e.object.matrix), Math.abs(e.object.up.dot(vt.direction)) < Da ? n.lookAt(e.target) : (Qt.setFromNormalAndCoplanarPoint(e.object.up, e.target), vt.intersectPlane(Qt, e.target))));
|
2514
2601
|
} else
|
2515
|
-
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(),
|
2516
|
-
return p = 1,
|
2602
|
+
e.object.isOrthographicCamera && (e.object.zoom = Math.max(e.minZoom, Math.min(e.maxZoom, e.object.zoom / p)), e.object.updateProjectionMatrix(), $e = !0);
|
2603
|
+
return p = 1, te = !1, $e || N.distanceToSquared(e.object.position) > c || 8 * (1 - ne.dot(e.object.quaternion)) > c || ve.distanceToSquared(e.target) > 0 ? (e.dispatchEvent(Zt), N.copy(e.object.position), ne.copy(e.object.quaternion), ve.copy(e.target), !0) : !1;
|
2517
2604
|
};
|
2518
2605
|
}(), this.dispose = function() {
|
2519
|
-
e.domElement.removeEventListener("contextmenu",
|
2606
|
+
e.domElement.removeEventListener("contextmenu", Ce), e.domElement.removeEventListener("pointerdown", qe), e.domElement.removeEventListener("pointercancel", Pe), e.domElement.removeEventListener("wheel", dt), e.domElement.removeEventListener("pointermove", we), e.domElement.removeEventListener("pointerup", Pe), e._domElementKeyEvents !== null && (e._domElementKeyEvents.removeEventListener("keydown", Je), e._domElementKeyEvents = null);
|
2520
2607
|
};
|
2521
|
-
const e = this,
|
2608
|
+
const e = this, r = {
|
2522
2609
|
NONE: -1,
|
2523
2610
|
ROTATE: 0,
|
2524
2611
|
DOLLY: 1,
|
@@ -2528,175 +2615,175 @@ class Ra extends Zt {
|
|
2528
2615
|
TOUCH_DOLLY_PAN: 5,
|
2529
2616
|
TOUCH_DOLLY_ROTATE: 6
|
2530
2617
|
};
|
2531
|
-
let
|
2532
|
-
const c = 1e-6,
|
2618
|
+
let s = r.NONE;
|
2619
|
+
const c = 1e-6, l = new zt(), d = new zt();
|
2533
2620
|
let p = 1;
|
2534
|
-
const
|
2535
|
-
let
|
2536
|
-
const
|
2537
|
-
function
|
2538
|
-
return
|
2539
|
-
}
|
2540
|
-
function
|
2541
|
-
const E = Math.abs(
|
2621
|
+
const m = new Y(), b = new ue(), x = new ue(), C = new ue(), S = new ue(), F = new ue(), Q = new ue(), H = new ue(), O = new ue(), K = new ue(), de = new Y(), ce = new ue();
|
2622
|
+
let te = !1;
|
2623
|
+
const f = [], g = {};
|
2624
|
+
function y(o) {
|
2625
|
+
return o !== null ? 2 * Math.PI / 60 * e.autoRotateSpeed * o : 2 * Math.PI / 60 / 60 * e.autoRotateSpeed;
|
2626
|
+
}
|
2627
|
+
function T(o) {
|
2628
|
+
const E = Math.abs(o) / (100 * (window.devicePixelRatio | 0));
|
2542
2629
|
return Math.pow(0.95, e.zoomSpeed * E);
|
2543
2630
|
}
|
2544
|
-
function
|
2545
|
-
d.theta -=
|
2631
|
+
function V(o) {
|
2632
|
+
d.theta -= o;
|
2546
2633
|
}
|
2547
|
-
function
|
2548
|
-
d.phi -=
|
2634
|
+
function z(o) {
|
2635
|
+
d.phi -= o;
|
2549
2636
|
}
|
2550
|
-
const
|
2551
|
-
const
|
2552
|
-
return function(
|
2553
|
-
|
2637
|
+
const U = function() {
|
2638
|
+
const o = new Y();
|
2639
|
+
return function(_, N) {
|
2640
|
+
o.setFromMatrixColumn(N, 0), o.multiplyScalar(-_), m.add(o);
|
2554
2641
|
};
|
2555
|
-
}(),
|
2556
|
-
const
|
2557
|
-
return function(
|
2558
|
-
e.screenSpacePanning === !0 ?
|
2642
|
+
}(), D = function() {
|
2643
|
+
const o = new Y();
|
2644
|
+
return function(_, N) {
|
2645
|
+
e.screenSpacePanning === !0 ? o.setFromMatrixColumn(N, 1) : (o.setFromMatrixColumn(N, 0), o.crossVectors(e.object.up, o)), o.multiplyScalar(_), m.add(o);
|
2559
2646
|
};
|
2560
|
-
}(),
|
2561
|
-
const
|
2562
|
-
return function(
|
2563
|
-
const
|
2647
|
+
}(), B = function() {
|
2648
|
+
const o = new Y();
|
2649
|
+
return function(_, N) {
|
2650
|
+
const ne = e.domElement;
|
2564
2651
|
if (e.object.isPerspectiveCamera) {
|
2565
|
-
const
|
2566
|
-
|
2567
|
-
let
|
2568
|
-
|
2652
|
+
const ve = e.object.position;
|
2653
|
+
o.copy(ve).sub(e.target);
|
2654
|
+
let le = o.length();
|
2655
|
+
le *= Math.tan(e.object.fov / 2 * Math.PI / 180), U(2 * _ * le / ne.clientHeight, e.object.matrix), D(2 * N * le / ne.clientHeight, e.object.matrix);
|
2569
2656
|
} else
|
2570
|
-
e.object.isOrthographicCamera ? (
|
2657
|
+
e.object.isOrthographicCamera ? (U(_ * (e.object.right - e.object.left) / e.object.zoom / ne.clientWidth, e.object.matrix), D(N * (e.object.top - e.object.bottom) / e.object.zoom / ne.clientHeight, e.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), e.enablePan = !1);
|
2571
2658
|
};
|
2572
2659
|
}();
|
2573
|
-
function
|
2574
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /=
|
2660
|
+
function J(o) {
|
2661
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p /= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2575
2662
|
}
|
2576
|
-
function
|
2577
|
-
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *=
|
2663
|
+
function R(o) {
|
2664
|
+
e.object.isPerspectiveCamera || e.object.isOrthographicCamera ? p *= o : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."), e.enableZoom = !1);
|
2578
2665
|
}
|
2579
|
-
function
|
2666
|
+
function I(o, E) {
|
2580
2667
|
if (!e.zoomToCursor)
|
2581
2668
|
return;
|
2582
|
-
|
2583
|
-
const
|
2584
|
-
|
2669
|
+
te = !0;
|
2670
|
+
const _ = e.domElement.getBoundingClientRect(), N = o - _.left, ne = E - _.top, ve = _.width, le = _.height;
|
2671
|
+
ce.x = N / ve * 2 - 1, ce.y = -(ne / le) * 2 + 1, de.set(ce.x, ce.y, 1).unproject(e.object).sub(e.object.position).normalize();
|
2585
2672
|
}
|
2586
|
-
function
|
2587
|
-
return Math.max(e.minDistance, Math.min(e.maxDistance,
|
2673
|
+
function X(o) {
|
2674
|
+
return Math.max(e.minDistance, Math.min(e.maxDistance, o));
|
2588
2675
|
}
|
2589
|
-
function
|
2590
|
-
b.set(
|
2676
|
+
function pe(o) {
|
2677
|
+
b.set(o.clientX, o.clientY);
|
2591
2678
|
}
|
2592
|
-
function
|
2593
|
-
|
2679
|
+
function Oe(o) {
|
2680
|
+
I(o.clientX, o.clientX), H.set(o.clientX, o.clientY);
|
2594
2681
|
}
|
2595
|
-
function
|
2596
|
-
|
2682
|
+
function He(o) {
|
2683
|
+
S.set(o.clientX, o.clientY);
|
2597
2684
|
}
|
2598
|
-
function
|
2599
|
-
x.set(
|
2685
|
+
function ot(o) {
|
2686
|
+
x.set(o.clientX, o.clientY), C.subVectors(x, b).multiplyScalar(e.rotateSpeed);
|
2600
2687
|
const E = e.domElement;
|
2601
|
-
|
2688
|
+
V(2 * Math.PI * C.x / E.clientHeight), z(2 * Math.PI * C.y / E.clientHeight), b.copy(x), e.update();
|
2602
2689
|
}
|
2603
|
-
function
|
2604
|
-
|
2690
|
+
function Ct(o) {
|
2691
|
+
O.set(o.clientX, o.clientY), K.subVectors(O, H), K.y > 0 ? J(T(K.y)) : K.y < 0 && R(T(K.y)), H.copy(O), e.update();
|
2605
2692
|
}
|
2606
|
-
function
|
2607
|
-
|
2693
|
+
function St(o) {
|
2694
|
+
F.set(o.clientX, o.clientY), Q.subVectors(F, S).multiplyScalar(e.panSpeed), B(Q.x, Q.y), S.copy(F), e.update();
|
2608
2695
|
}
|
2609
|
-
function
|
2610
|
-
|
2696
|
+
function Ke(o) {
|
2697
|
+
I(o.clientX, o.clientY), o.deltaY < 0 ? R(T(o.deltaY)) : o.deltaY > 0 && J(T(o.deltaY)), e.update();
|
2611
2698
|
}
|
2612
|
-
function
|
2699
|
+
function Xe(o) {
|
2613
2700
|
let E = !1;
|
2614
|
-
switch (
|
2701
|
+
switch (o.code) {
|
2615
2702
|
case e.keys.UP:
|
2616
|
-
|
2703
|
+
o.ctrlKey || o.metaKey || o.shiftKey ? z(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, e.keyPanSpeed), E = !0;
|
2617
2704
|
break;
|
2618
2705
|
case e.keys.BOTTOM:
|
2619
|
-
|
2706
|
+
o.ctrlKey || o.metaKey || o.shiftKey ? z(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(0, -e.keyPanSpeed), E = !0;
|
2620
2707
|
break;
|
2621
2708
|
case e.keys.LEFT:
|
2622
|
-
|
2709
|
+
o.ctrlKey || o.metaKey || o.shiftKey ? V(2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(e.keyPanSpeed, 0), E = !0;
|
2623
2710
|
break;
|
2624
2711
|
case e.keys.RIGHT:
|
2625
|
-
|
2712
|
+
o.ctrlKey || o.metaKey || o.shiftKey ? V(-2 * Math.PI * e.rotateSpeed / e.domElement.clientHeight) : B(-e.keyPanSpeed, 0), E = !0;
|
2626
2713
|
break;
|
2627
2714
|
}
|
2628
|
-
E && (
|
2715
|
+
E && (o.preventDefault(), e.update());
|
2629
2716
|
}
|
2630
|
-
function
|
2631
|
-
if (
|
2632
|
-
b.set(
|
2717
|
+
function Te(o) {
|
2718
|
+
if (f.length === 1)
|
2719
|
+
b.set(o.pageX, o.pageY);
|
2633
2720
|
else {
|
2634
|
-
const E =
|
2635
|
-
b.set(
|
2721
|
+
const E = ge(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
|
2722
|
+
b.set(_, N);
|
2636
2723
|
}
|
2637
2724
|
}
|
2638
|
-
function
|
2639
|
-
if (
|
2640
|
-
|
2725
|
+
function Ue(o) {
|
2726
|
+
if (f.length === 1)
|
2727
|
+
S.set(o.pageX, o.pageY);
|
2641
2728
|
else {
|
2642
|
-
const E =
|
2643
|
-
|
2729
|
+
const E = ge(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
|
2730
|
+
S.set(_, N);
|
2644
2731
|
}
|
2645
2732
|
}
|
2646
|
-
function
|
2647
|
-
const E =
|
2648
|
-
|
2733
|
+
function Me(o) {
|
2734
|
+
const E = ge(o), _ = o.pageX - E.x, N = o.pageY - E.y, ne = Math.sqrt(_ * _ + N * N);
|
2735
|
+
H.set(0, ne);
|
2649
2736
|
}
|
2650
|
-
function
|
2651
|
-
e.enableZoom &&
|
2737
|
+
function Ot(o) {
|
2738
|
+
e.enableZoom && Me(o), e.enablePan && Ue(o);
|
2652
2739
|
}
|
2653
|
-
function
|
2654
|
-
e.enableZoom &&
|
2740
|
+
function st(o) {
|
2741
|
+
e.enableZoom && Me(o), e.enableRotate && Te(o);
|
2655
2742
|
}
|
2656
|
-
function
|
2657
|
-
if (
|
2658
|
-
x.set(
|
2743
|
+
function ct(o) {
|
2744
|
+
if (f.length == 1)
|
2745
|
+
x.set(o.pageX, o.pageY);
|
2659
2746
|
else {
|
2660
|
-
const
|
2661
|
-
x.set(
|
2747
|
+
const _ = ge(o), N = 0.5 * (o.pageX + _.x), ne = 0.5 * (o.pageY + _.y);
|
2748
|
+
x.set(N, ne);
|
2662
2749
|
}
|
2663
|
-
|
2750
|
+
C.subVectors(x, b).multiplyScalar(e.rotateSpeed);
|
2664
2751
|
const E = e.domElement;
|
2665
|
-
|
2752
|
+
V(2 * Math.PI * C.x / E.clientHeight), z(2 * Math.PI * C.y / E.clientHeight), b.copy(x);
|
2666
2753
|
}
|
2667
|
-
function
|
2668
|
-
if (
|
2669
|
-
|
2754
|
+
function lt(o) {
|
2755
|
+
if (f.length === 1)
|
2756
|
+
F.set(o.pageX, o.pageY);
|
2670
2757
|
else {
|
2671
|
-
const E =
|
2672
|
-
|
2758
|
+
const E = ge(o), _ = 0.5 * (o.pageX + E.x), N = 0.5 * (o.pageY + E.y);
|
2759
|
+
F.set(_, N);
|
2673
2760
|
}
|
2674
|
-
|
2761
|
+
Q.subVectors(F, S).multiplyScalar(e.panSpeed), B(Q.x, Q.y), S.copy(F);
|
2675
2762
|
}
|
2676
|
-
function
|
2677
|
-
const E =
|
2678
|
-
|
2679
|
-
const
|
2680
|
-
|
2763
|
+
function Re(o) {
|
2764
|
+
const E = ge(o), _ = o.pageX - E.x, N = o.pageY - E.y, ne = Math.sqrt(_ * _ + N * N);
|
2765
|
+
O.set(0, ne), K.set(0, Math.pow(O.y / H.y, e.zoomSpeed)), J(K.y), H.copy(O);
|
2766
|
+
const ve = (o.pageX + E.x) * 0.5, le = (o.pageY + E.y) * 0.5;
|
2767
|
+
I(ve, le);
|
2681
2768
|
}
|
2682
|
-
function
|
2683
|
-
e.enableZoom &&
|
2769
|
+
function Be(o) {
|
2770
|
+
e.enableZoom && Re(o), e.enablePan && lt(o);
|
2684
2771
|
}
|
2685
|
-
function
|
2686
|
-
e.enableZoom &&
|
2772
|
+
function ut(o) {
|
2773
|
+
e.enableZoom && Re(o), e.enableRotate && ct(o);
|
2687
2774
|
}
|
2688
|
-
function
|
2689
|
-
e.enabled !== !1 && (
|
2775
|
+
function qe(o) {
|
2776
|
+
e.enabled !== !1 && (f.length === 0 && (e.domElement.setPointerCapture(o.pointerId), e.domElement.addEventListener("pointermove", we), e.domElement.addEventListener("pointerup", Pe)), Mt(o), o.pointerType === "touch" ? ft(o) : Tt(o));
|
2690
2777
|
}
|
2691
|
-
function
|
2692
|
-
e.enabled !== !1 && (
|
2778
|
+
function we(o) {
|
2779
|
+
e.enabled !== !1 && (o.pointerType === "touch" ? ht(o) : Ze(o));
|
2693
2780
|
}
|
2694
|
-
function
|
2695
|
-
|
2781
|
+
function Pe(o) {
|
2782
|
+
pt(o), f.length === 0 && (e.domElement.releasePointerCapture(o.pointerId), e.domElement.removeEventListener("pointermove", we), e.domElement.removeEventListener("pointerup", Pe)), e.dispatchEvent(Jt), s = r.NONE;
|
2696
2783
|
}
|
2697
|
-
function
|
2784
|
+
function Tt(o) {
|
2698
2785
|
let E;
|
2699
|
-
switch (
|
2786
|
+
switch (o.button) {
|
2700
2787
|
case 0:
|
2701
2788
|
E = e.mouseButtons.LEFT;
|
2702
2789
|
break;
|
@@ -2710,464 +2797,573 @@ class Ra extends Zt {
|
|
2710
2797
|
E = -1;
|
2711
2798
|
}
|
2712
2799
|
switch (E) {
|
2713
|
-
case
|
2800
|
+
case ze.DOLLY:
|
2714
2801
|
if (e.enableZoom === !1)
|
2715
2802
|
return;
|
2716
|
-
|
2803
|
+
Oe(o), s = r.DOLLY;
|
2717
2804
|
break;
|
2718
|
-
case
|
2719
|
-
if (
|
2805
|
+
case ze.ROTATE:
|
2806
|
+
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
2720
2807
|
if (e.enablePan === !1)
|
2721
2808
|
return;
|
2722
|
-
|
2809
|
+
He(o), s = r.PAN;
|
2723
2810
|
} else {
|
2724
2811
|
if (e.enableRotate === !1)
|
2725
2812
|
return;
|
2726
|
-
|
2813
|
+
pe(o), s = r.ROTATE;
|
2727
2814
|
}
|
2728
2815
|
break;
|
2729
|
-
case
|
2730
|
-
if (
|
2816
|
+
case ze.PAN:
|
2817
|
+
if (o.ctrlKey || o.metaKey || o.shiftKey) {
|
2731
2818
|
if (e.enableRotate === !1)
|
2732
2819
|
return;
|
2733
|
-
|
2820
|
+
pe(o), s = r.ROTATE;
|
2734
2821
|
} else {
|
2735
2822
|
if (e.enablePan === !1)
|
2736
2823
|
return;
|
2737
|
-
|
2824
|
+
He(o), s = r.PAN;
|
2738
2825
|
}
|
2739
2826
|
break;
|
2740
2827
|
default:
|
2741
|
-
|
2828
|
+
s = r.NONE;
|
2742
2829
|
}
|
2743
|
-
|
2830
|
+
s !== r.NONE && e.dispatchEvent(_t);
|
2744
2831
|
}
|
2745
|
-
function
|
2746
|
-
switch (
|
2747
|
-
case
|
2832
|
+
function Ze(o) {
|
2833
|
+
switch (s) {
|
2834
|
+
case r.ROTATE:
|
2748
2835
|
if (e.enableRotate === !1)
|
2749
2836
|
return;
|
2750
|
-
|
2837
|
+
ot(o);
|
2751
2838
|
break;
|
2752
|
-
case
|
2839
|
+
case r.DOLLY:
|
2753
2840
|
if (e.enableZoom === !1)
|
2754
2841
|
return;
|
2755
|
-
|
2842
|
+
Ct(o);
|
2756
2843
|
break;
|
2757
|
-
case
|
2844
|
+
case r.PAN:
|
2758
2845
|
if (e.enablePan === !1)
|
2759
2846
|
return;
|
2760
|
-
|
2847
|
+
St(o);
|
2761
2848
|
break;
|
2762
2849
|
}
|
2763
2850
|
}
|
2764
|
-
function
|
2765
|
-
e.enabled === !1 || e.enableZoom === !1 ||
|
2851
|
+
function dt(o) {
|
2852
|
+
e.enabled === !1 || e.enableZoom === !1 || s !== r.NONE || (o.preventDefault(), e.dispatchEvent(_t), Ke(o), e.dispatchEvent(Jt));
|
2766
2853
|
}
|
2767
|
-
function
|
2768
|
-
e.enabled === !1 || e.enablePan === !1 ||
|
2854
|
+
function Je(o) {
|
2855
|
+
e.enabled === !1 || e.enablePan === !1 || Xe(o);
|
2769
2856
|
}
|
2770
|
-
function
|
2771
|
-
switch (
|
2857
|
+
function ft(o) {
|
2858
|
+
switch (Qe(o), f.length) {
|
2772
2859
|
case 1:
|
2773
2860
|
switch (e.touches.ONE) {
|
2774
|
-
case
|
2861
|
+
case Ye.ROTATE:
|
2775
2862
|
if (e.enableRotate === !1)
|
2776
2863
|
return;
|
2777
|
-
|
2864
|
+
Te(o), s = r.TOUCH_ROTATE;
|
2778
2865
|
break;
|
2779
|
-
case
|
2866
|
+
case Ye.PAN:
|
2780
2867
|
if (e.enablePan === !1)
|
2781
2868
|
return;
|
2782
|
-
|
2869
|
+
Ue(o), s = r.TOUCH_PAN;
|
2783
2870
|
break;
|
2784
2871
|
default:
|
2785
|
-
|
2872
|
+
s = r.NONE;
|
2786
2873
|
}
|
2787
2874
|
break;
|
2788
2875
|
case 2:
|
2789
2876
|
switch (e.touches.TWO) {
|
2790
|
-
case
|
2877
|
+
case Ye.DOLLY_PAN:
|
2791
2878
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2792
2879
|
return;
|
2793
|
-
|
2880
|
+
Ot(o), s = r.TOUCH_DOLLY_PAN;
|
2794
2881
|
break;
|
2795
|
-
case
|
2882
|
+
case Ye.DOLLY_ROTATE:
|
2796
2883
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2797
2884
|
return;
|
2798
|
-
|
2885
|
+
st(o), s = r.TOUCH_DOLLY_ROTATE;
|
2799
2886
|
break;
|
2800
2887
|
default:
|
2801
|
-
|
2888
|
+
s = r.NONE;
|
2802
2889
|
}
|
2803
2890
|
break;
|
2804
2891
|
default:
|
2805
|
-
|
2892
|
+
s = r.NONE;
|
2806
2893
|
}
|
2807
|
-
|
2894
|
+
s !== r.NONE && e.dispatchEvent(_t);
|
2808
2895
|
}
|
2809
|
-
function
|
2810
|
-
switch (
|
2811
|
-
case
|
2896
|
+
function ht(o) {
|
2897
|
+
switch (Qe(o), s) {
|
2898
|
+
case r.TOUCH_ROTATE:
|
2812
2899
|
if (e.enableRotate === !1)
|
2813
2900
|
return;
|
2814
|
-
|
2901
|
+
ct(o), e.update();
|
2815
2902
|
break;
|
2816
|
-
case
|
2903
|
+
case r.TOUCH_PAN:
|
2817
2904
|
if (e.enablePan === !1)
|
2818
2905
|
return;
|
2819
|
-
|
2906
|
+
lt(o), e.update();
|
2820
2907
|
break;
|
2821
|
-
case
|
2908
|
+
case r.TOUCH_DOLLY_PAN:
|
2822
2909
|
if (e.enableZoom === !1 && e.enablePan === !1)
|
2823
2910
|
return;
|
2824
|
-
|
2911
|
+
Be(o), e.update();
|
2825
2912
|
break;
|
2826
|
-
case
|
2913
|
+
case r.TOUCH_DOLLY_ROTATE:
|
2827
2914
|
if (e.enableZoom === !1 && e.enableRotate === !1)
|
2828
2915
|
return;
|
2829
|
-
|
2916
|
+
ut(o), e.update();
|
2830
2917
|
break;
|
2831
2918
|
default:
|
2832
|
-
|
2919
|
+
s = r.NONE;
|
2833
2920
|
}
|
2834
2921
|
}
|
2835
|
-
function
|
2836
|
-
e.enabled !== !1 &&
|
2922
|
+
function Ce(o) {
|
2923
|
+
e.enabled !== !1 && o.preventDefault();
|
2837
2924
|
}
|
2838
|
-
function
|
2839
|
-
|
2925
|
+
function Mt(o) {
|
2926
|
+
f.push(o.pointerId);
|
2840
2927
|
}
|
2841
|
-
function
|
2842
|
-
delete
|
2843
|
-
for (let E = 0; E <
|
2844
|
-
if (
|
2845
|
-
|
2928
|
+
function pt(o) {
|
2929
|
+
delete g[o.pointerId];
|
2930
|
+
for (let E = 0; E < f.length; E++)
|
2931
|
+
if (f[E] == o.pointerId) {
|
2932
|
+
f.splice(E, 1);
|
2846
2933
|
return;
|
2847
2934
|
}
|
2848
2935
|
}
|
2849
|
-
function
|
2850
|
-
let E =
|
2851
|
-
E === void 0 && (E = new
|
2936
|
+
function Qe(o) {
|
2937
|
+
let E = g[o.pointerId];
|
2938
|
+
E === void 0 && (E = new ue(), g[o.pointerId] = E), E.set(o.pageX, o.pageY);
|
2852
2939
|
}
|
2853
|
-
function
|
2854
|
-
const E =
|
2855
|
-
return
|
2940
|
+
function ge(o) {
|
2941
|
+
const E = o.pointerId === f[0] ? f[1] : f[0];
|
2942
|
+
return g[E];
|
2856
2943
|
}
|
2857
|
-
e.domElement.addEventListener("contextmenu",
|
2944
|
+
e.domElement.addEventListener("contextmenu", Ce), e.domElement.addEventListener("pointerdown", qe), e.domElement.addEventListener("pointercancel", Pe), e.domElement.addEventListener("wheel", dt, { passive: !1 }), this.update();
|
2858
2945
|
}
|
2859
2946
|
}
|
2860
|
-
const
|
2861
|
-
const [n, a] =
|
2862
|
-
|
2863
|
-
},
|
2864
|
-
s !==
|
2947
|
+
const Et = (t) => {
|
2948
|
+
const [n, a] = ie(t.options[t.index]), e = () => {
|
2949
|
+
t.onToggle(!t.open);
|
2950
|
+
}, r = (s) => {
|
2951
|
+
s !== n && (t.onSelect(s), a(s)), t.onToggle(!1);
|
2865
2952
|
};
|
2866
|
-
return /* @__PURE__ */
|
2867
|
-
/* @__PURE__ */
|
2868
|
-
|
2953
|
+
return /* @__PURE__ */ u.jsxs("div", { className: `dropdown ${t.up === !0 ? "up" : ""}`, children: [
|
2954
|
+
/* @__PURE__ */ u.jsx("div", { className: "dropdown-toggle", onClick: e, children: n }),
|
2955
|
+
t.open && /* @__PURE__ */ u.jsx("ul", { className: "dropdown-menu", children: t.options.map((s) => /* @__PURE__ */ u.jsx("li", { onClick: () => r(s), children: s }, s)) })
|
2869
2956
|
] });
|
2870
|
-
},
|
2871
|
-
const e = n.options.indexOf(n.camera.name);
|
2872
|
-
return /* @__PURE__ */
|
2873
|
-
/* @__PURE__ */
|
2874
|
-
|
2957
|
+
}, ke = Xn(function(n, a) {
|
2958
|
+
const [e, r] = ie(!1), s = n.options.indexOf(n.camera.name);
|
2959
|
+
return /* @__PURE__ */ u.jsxs("div", { className: "CameraWindow", children: [
|
2960
|
+
/* @__PURE__ */ u.jsx("div", { ref: a, className: "clickable", onClick: () => {
|
2961
|
+
e && r(!1);
|
2962
|
+
} }),
|
2963
|
+
/* @__PURE__ */ u.jsx(
|
2964
|
+
Et,
|
2965
|
+
{
|
2966
|
+
index: s,
|
2967
|
+
open: e,
|
2968
|
+
options: n.options,
|
2969
|
+
onSelect: n.onSelect,
|
2970
|
+
onToggle: (c) => {
|
2971
|
+
r(c);
|
2972
|
+
},
|
2973
|
+
up: !0
|
2974
|
+
}
|
2975
|
+
)
|
2875
2976
|
] });
|
2876
|
-
}),
|
2977
|
+
}), en = [
|
2877
2978
|
"Single",
|
2878
2979
|
"Side by Side",
|
2879
2980
|
"Stacked",
|
2880
2981
|
"Quad"
|
2881
|
-
],
|
2882
|
-
function
|
2883
|
-
const a = new
|
2884
|
-
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0),
|
2982
|
+
], ae = /* @__PURE__ */ new Map(), re = /* @__PURE__ */ new Map(), Ee = /* @__PURE__ */ new Map();
|
2983
|
+
function Fe(t, n) {
|
2984
|
+
const a = new on(-100, 100, 100, -100, 50, 3e3);
|
2985
|
+
return a.name = t, a.position.copy(n), a.lookAt(0, 0, 0), ae.set(t, a), a;
|
2885
2986
|
}
|
2886
|
-
|
2887
|
-
|
2888
|
-
|
2889
|
-
|
2890
|
-
|
2891
|
-
|
2892
|
-
|
2893
|
-
const
|
2894
|
-
|
2895
|
-
|
2896
|
-
|
2897
|
-
|
2898
|
-
const
|
2987
|
+
Fe("Top", new Y(0, 1e3, 0));
|
2988
|
+
Fe("Bottom", new Y(0, -1e3, 0));
|
2989
|
+
Fe("Left", new Y(-1e3, 0, 0));
|
2990
|
+
Fe("Right", new Y(1e3, 0, 0));
|
2991
|
+
Fe("Front", new Y(0, 0, 1e3));
|
2992
|
+
Fe("Back", new Y(0, 0, -1e3));
|
2993
|
+
Fe("Orthographic", new Y(1e3, 1e3, 1e3));
|
2994
|
+
const wt = new kt(60, 1, 50, 3e3);
|
2995
|
+
wt.name = "Debug";
|
2996
|
+
wt.position.set(500, 500, 500);
|
2997
|
+
wt.lookAt(0, 0, 0);
|
2998
|
+
ae.set("Debug", wt);
|
2999
|
+
const tn = [
|
2899
3000
|
"Renderer",
|
2900
3001
|
"Depth",
|
2901
3002
|
"Normals",
|
2902
3003
|
"UVs",
|
2903
3004
|
"Wireframe"
|
2904
|
-
],
|
3005
|
+
], Na = new Fn(), La = new Un(), Fa = new ba(), Ua = new Bn({
|
2905
3006
|
opacity: 0.33,
|
2906
3007
|
transparent: !0,
|
2907
3008
|
wireframe: !0
|
2908
3009
|
});
|
2909
|
-
let
|
2910
|
-
const
|
2911
|
-
|
2912
|
-
let
|
2913
|
-
|
2914
|
-
const
|
2915
|
-
|
2916
|
-
|
2917
|
-
|
2918
|
-
|
2919
|
-
|
2920
|
-
|
2921
|
-
|
2922
|
-
|
2923
|
-
|
2924
|
-
|
2925
|
-
|
2926
|
-
|
2927
|
-
|
3010
|
+
let bt = "Renderer";
|
3011
|
+
const G = new sn();
|
3012
|
+
G.name = "Debug Scene";
|
3013
|
+
let Ie = new sn();
|
3014
|
+
G.add(Ie);
|
3015
|
+
const rt = new $n();
|
3016
|
+
rt.name = "helpers";
|
3017
|
+
G.add(rt);
|
3018
|
+
const Ba = new ma();
|
3019
|
+
rt.add(Ba);
|
3020
|
+
const vn = new cn(500);
|
3021
|
+
vn.name = "axisHelper";
|
3022
|
+
rt.add(vn);
|
3023
|
+
const it = new cn(100);
|
3024
|
+
it.name = "interactionHelper";
|
3025
|
+
rt.add(it);
|
3026
|
+
it.visible = !1;
|
3027
|
+
let yt = !1, $ = ae.get("Debug"), oe = ae.get("Orthographic"), Ae = ae.get("Front"), De = ae.get("Top");
|
3028
|
+
function ri(t) {
|
3029
|
+
const [n, a] = ie(t.mode !== void 0 ? t.mode : "Quad"), [e, r] = ie(null), [s, c] = ie(!1), [l, d] = ie(!1), [p, m] = ie(!1), [, b] = ie(Date.now()), x = xe(null), C = xe(null), S = xe(null), F = xe(null), Q = xe(null), H = xe(null), O = (f, g) => {
|
3030
|
+
const y = re.get(f.name);
|
3031
|
+
y !== void 0 && y.dispose(), re.delete(f.name);
|
3032
|
+
const T = Ee.get(f.name);
|
3033
|
+
T !== void 0 && (G.remove(T), T.dispose()), Ee.delete(f.name);
|
3034
|
+
const V = new Ia(f, g);
|
3035
|
+
switch (V.enableDamping = !0, V.dampingFactor = 0.05, f.name) {
|
2928
3036
|
case "Top":
|
2929
3037
|
case "Bottom":
|
2930
3038
|
case "Left":
|
2931
3039
|
case "Right":
|
2932
3040
|
case "Front":
|
2933
3041
|
case "Back":
|
2934
|
-
|
3042
|
+
V.enableRotate = !1;
|
2935
3043
|
break;
|
2936
3044
|
}
|
2937
|
-
if (
|
2938
|
-
const
|
2939
|
-
|
2940
|
-
}
|
2941
|
-
},
|
2942
|
-
const
|
2943
|
-
|
2944
|
-
const y =
|
2945
|
-
y !== void 0 && (y.dispose(),
|
2946
|
-
},
|
2947
|
-
|
2948
|
-
|
2949
|
-
const y =
|
2950
|
-
y !== void 0 && (
|
2951
|
-
}),
|
2952
|
-
},
|
3045
|
+
if (re.set(f.name, V), f instanceof kt) {
|
3046
|
+
const z = new zn(f);
|
3047
|
+
Ee.set(f.name, z), G.add(z);
|
3048
|
+
}
|
3049
|
+
}, K = (f) => {
|
3050
|
+
const g = Ee.get(f.name);
|
3051
|
+
g !== void 0 && (G.remove(g), g.dispose(), Ee.delete(f.name));
|
3052
|
+
const y = re.get(f.name);
|
3053
|
+
y !== void 0 && (y.dispose(), re.delete(f.name));
|
3054
|
+
}, de = () => {
|
3055
|
+
re.forEach((f, g) => {
|
3056
|
+
f.dispose();
|
3057
|
+
const y = Ee.get(g);
|
3058
|
+
y !== void 0 && (G.remove(y), y.dispose()), Ee.delete(g), re.delete(g);
|
3059
|
+
}), re.clear(), Ee.clear();
|
3060
|
+
}, ce = () => {
|
2953
3061
|
switch (n) {
|
2954
3062
|
case "Single":
|
2955
|
-
|
3063
|
+
O($, S.current);
|
2956
3064
|
break;
|
2957
3065
|
case "Side by Side":
|
2958
3066
|
case "Stacked":
|
2959
|
-
|
3067
|
+
O($, S.current), O(oe, F.current);
|
2960
3068
|
break;
|
2961
3069
|
case "Quad":
|
2962
|
-
|
3070
|
+
O($, S.current), O(oe, F.current), O(Ae, Q.current), O(De, H.current);
|
2963
3071
|
break;
|
2964
3072
|
}
|
2965
3073
|
};
|
2966
|
-
|
2967
|
-
const
|
2968
|
-
canvas:
|
3074
|
+
Ne(() => {
|
3075
|
+
const f = new Gn({
|
3076
|
+
canvas: x.current,
|
2969
3077
|
stencil: !1
|
2970
3078
|
});
|
2971
|
-
|
2972
|
-
}, []),
|
2973
|
-
const
|
2974
|
-
|
3079
|
+
f.autoClear = !1, f.shadowMap.enabled = !0, f.setPixelRatio(devicePixelRatio), f.setClearColor(0), r(f);
|
3080
|
+
}, []), Ne(() => {
|
3081
|
+
const f = () => {
|
3082
|
+
fn(Ie), G.remove(Ie), t.three.scene !== void 0 && (Ie = t.three.scene, G.add(Ie));
|
3083
|
+
}, g = (T) => {
|
3084
|
+
var U;
|
3085
|
+
const V = T.value, z = (U = t.three.scene) == null ? void 0 : U.getObjectByProperty("uuid", V.uuid);
|
3086
|
+
z !== void 0 && ae.set(V.name, z), b(Date.now());
|
3087
|
+
}, y = (T) => {
|
3088
|
+
ae.delete(T.value.name), b(Date.now());
|
2975
3089
|
};
|
2976
|
-
return
|
2977
|
-
|
3090
|
+
return k.addEventListener(A.SET_SCENE, f), k.addEventListener(A.ADD_CAMERA, g), k.addEventListener(A.REMOVE_CAMERA, y), () => {
|
3091
|
+
k.removeEventListener(A.SET_SCENE, f), k.removeEventListener(A.ADD_CAMERA, g), k.removeEventListener(A.REMOVE_CAMERA, y);
|
2978
3092
|
};
|
2979
|
-
}, []),
|
3093
|
+
}, []), Ne(() => {
|
2980
3094
|
if (e === null)
|
2981
3095
|
return;
|
2982
|
-
let
|
2983
|
-
const
|
2984
|
-
|
2985
|
-
let
|
3096
|
+
let f = window.innerWidth, g = window.innerHeight, y = Math.floor(f / 2), T = Math.floor(g / 2), V = -1;
|
3097
|
+
const z = () => {
|
3098
|
+
f = window.innerWidth - 300, g = window.innerHeight, y = Math.floor(f / 2), T = Math.floor(g / 2), e.setSize(f, g);
|
3099
|
+
let R = f, I = g;
|
2986
3100
|
switch (n) {
|
2987
3101
|
case "Side by Side":
|
2988
|
-
|
3102
|
+
R = y, I = g;
|
2989
3103
|
break;
|
2990
3104
|
case "Stacked":
|
2991
|
-
|
3105
|
+
R = f, I = T;
|
2992
3106
|
break;
|
2993
3107
|
case "Quad":
|
2994
|
-
|
3108
|
+
R = y, I = T;
|
2995
3109
|
break;
|
2996
3110
|
}
|
2997
|
-
|
2998
|
-
var
|
2999
|
-
|
3111
|
+
ae.forEach((X) => {
|
3112
|
+
var pe;
|
3113
|
+
X instanceof on ? (X.left = R / -2, X.right = R / 2, X.top = I / 2, X.bottom = I / -2, X.updateProjectionMatrix()) : X instanceof kt && (X.aspect = R / I, X.updateProjectionMatrix(), (pe = Ee.get(X.name)) == null || pe.update());
|
3000
3114
|
});
|
3001
|
-
},
|
3002
|
-
e.setViewport(0, 0,
|
3003
|
-
},
|
3115
|
+
}, U = () => {
|
3116
|
+
e.setViewport(0, 0, f, g), e.setScissor(0, 0, f, g), e.render(G, $);
|
3117
|
+
}, D = () => {
|
3004
3118
|
if (n === "Side by Side")
|
3005
|
-
e.setViewport(0, 0, y,
|
3119
|
+
e.setViewport(0, 0, y, g), e.setScissor(0, 0, y, g), e.render(G, $), e.setViewport(y, 0, y, g), e.setScissor(y, 0, y, g), e.render(G, oe);
|
3006
3120
|
else {
|
3007
|
-
const
|
3008
|
-
e.setViewport(0,
|
3009
|
-
}
|
3010
|
-
},
|
3011
|
-
let
|
3012
|
-
|
3013
|
-
},
|
3014
|
-
switch (
|
3015
|
-
|
3121
|
+
const R = g - T;
|
3122
|
+
e.setViewport(0, R, f, T), e.setScissor(0, R, f, T), e.render(G, $), e.setViewport(0, 0, f, T), e.setScissor(0, 0, f, T), e.render(G, oe);
|
3123
|
+
}
|
3124
|
+
}, B = () => {
|
3125
|
+
let R = 0, I = 0;
|
3126
|
+
I = g - T, R = 0, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, $), R = y, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, oe), I = 0, R = 0, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, Ae), R = y, e.setViewport(R, I, y, T), e.setScissor(R, I, y, T), e.render(G, De);
|
3127
|
+
}, J = () => {
|
3128
|
+
switch (re.forEach((R) => {
|
3129
|
+
R.update();
|
3016
3130
|
}), e.clear(), n) {
|
3017
3131
|
case "Single":
|
3018
|
-
|
3132
|
+
U();
|
3019
3133
|
break;
|
3020
3134
|
case "Side by Side":
|
3021
3135
|
case "Stacked":
|
3022
|
-
|
3136
|
+
D();
|
3023
3137
|
break;
|
3024
3138
|
case "Quad":
|
3025
|
-
|
3139
|
+
B();
|
3026
3140
|
break;
|
3027
3141
|
}
|
3028
|
-
|
3142
|
+
V = requestAnimationFrame(J);
|
3029
3143
|
};
|
3030
|
-
return
|
3031
|
-
window.removeEventListener("resize",
|
3144
|
+
return ce(), window.addEventListener("resize", z), z(), J(), () => {
|
3145
|
+
window.removeEventListener("resize", z), cancelAnimationFrame(V), V = -1;
|
3032
3146
|
};
|
3147
|
+
}, [n, e]), Ne(() => {
|
3148
|
+
if (e !== null) {
|
3149
|
+
const f = new Vn(), g = new ue(), y = (U, D, B, J) => {
|
3150
|
+
switch (n) {
|
3151
|
+
case "Quad":
|
3152
|
+
U < B ? D < J ? f.setFromCamera(g, $) : f.setFromCamera(g, Ae) : D < J ? f.setFromCamera(g, oe) : f.setFromCamera(g, De);
|
3153
|
+
break;
|
3154
|
+
case "Side by Side":
|
3155
|
+
U < B ? f.setFromCamera(g, $) : f.setFromCamera(g, oe);
|
3156
|
+
break;
|
3157
|
+
case "Single":
|
3158
|
+
f.setFromCamera(g, $);
|
3159
|
+
break;
|
3160
|
+
case "Stacked":
|
3161
|
+
D < J ? f.setFromCamera(g, $) : f.setFromCamera(g, oe);
|
3162
|
+
break;
|
3163
|
+
}
|
3164
|
+
}, T = (U) => {
|
3165
|
+
if (!yt)
|
3166
|
+
return;
|
3167
|
+
const D = new ue();
|
3168
|
+
e.getSize(D);
|
3169
|
+
const B = Math.min(U.clientX, D.x), J = Math.min(U.clientY, D.y);
|
3170
|
+
g.x = We(B, 0, D.x, -1, 1), g.y = We(J, 0, D.y, 1, -1);
|
3171
|
+
const R = D.x / 2, I = D.y / 2, X = () => {
|
3172
|
+
B < R ? g.x = We(B, 0, R, -1, 1) : g.x = We(B, R, D.x, -1, 1);
|
3173
|
+
}, pe = () => {
|
3174
|
+
J < I ? g.y = We(J, 0, I, 1, -1) : g.y = We(J, I, D.y, 1, -1);
|
3175
|
+
};
|
3176
|
+
switch (n) {
|
3177
|
+
case "Quad":
|
3178
|
+
X(), pe();
|
3179
|
+
break;
|
3180
|
+
case "Side by Side":
|
3181
|
+
X();
|
3182
|
+
break;
|
3183
|
+
case "Stacked":
|
3184
|
+
pe(), pe();
|
3185
|
+
break;
|
3186
|
+
}
|
3187
|
+
y(B, J, R, I);
|
3188
|
+
const Oe = f.intersectObjects(Ie.children);
|
3189
|
+
Oe.length > 0 && it.position.copy(Oe[0].point);
|
3190
|
+
}, V = (U) => {
|
3191
|
+
if (!yt)
|
3192
|
+
return;
|
3193
|
+
const D = new ue();
|
3194
|
+
if (e.getSize(D), U.clientX >= D.x)
|
3195
|
+
return;
|
3196
|
+
T(U);
|
3197
|
+
const B = f.intersectObjects(Ie.children);
|
3198
|
+
B.length > 0 && t.three.getObject(B[0].object.uuid);
|
3199
|
+
}, z = C.current;
|
3200
|
+
return z.addEventListener("mousemove", T, !1), z.addEventListener("click", V, !1), () => {
|
3201
|
+
z.removeEventListener("mousemove", T), z.removeEventListener("click", V);
|
3202
|
+
};
|
3203
|
+
}
|
3033
3204
|
}, [n, e]);
|
3034
|
-
const
|
3035
|
-
return
|
3036
|
-
|
3037
|
-
}), /* @__PURE__ */
|
3038
|
-
/* @__PURE__ */
|
3039
|
-
/* @__PURE__ */
|
3040
|
-
n === "Single" && /* @__PURE__ */
|
3205
|
+
const te = [];
|
3206
|
+
return ae.forEach((f, g) => {
|
3207
|
+
te.push(g);
|
3208
|
+
}), /* @__PURE__ */ u.jsxs("div", { className: "multiview", children: [
|
3209
|
+
/* @__PURE__ */ u.jsx("canvas", { ref: x }),
|
3210
|
+
/* @__PURE__ */ u.jsxs("div", { className: `cameras ${n === "Single" || n === "Stacked" ? "single" : ""}`, ref: C, children: [
|
3211
|
+
n === "Single" && /* @__PURE__ */ u.jsx(u.Fragment, { children: /* @__PURE__ */ u.jsx(ke, { camera: $, options: te, ref: S, onSelect: (f) => {
|
3041
3212
|
var y;
|
3042
|
-
(y =
|
3043
|
-
const
|
3044
|
-
|
3213
|
+
(y = re.get($.name)) == null || y.dispose();
|
3214
|
+
const g = ae.get(f);
|
3215
|
+
g !== void 0 && (K($), $ = g, O(g, S.current));
|
3045
3216
|
} }) }),
|
3046
|
-
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */
|
3047
|
-
/* @__PURE__ */
|
3217
|
+
(n === "Side by Side" || n === "Stacked") && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
3218
|
+
/* @__PURE__ */ u.jsx(ke, { camera: $, options: te, ref: S, onSelect: (f) => {
|
3048
3219
|
var y;
|
3049
|
-
(y =
|
3050
|
-
const
|
3051
|
-
|
3220
|
+
(y = re.get($.name)) == null || y.dispose();
|
3221
|
+
const g = ae.get(f);
|
3222
|
+
g !== void 0 && (K($), $ = g, O(g, S.current));
|
3052
3223
|
} }),
|
3053
|
-
/* @__PURE__ */
|
3224
|
+
/* @__PURE__ */ u.jsx(ke, { camera: oe, options: te, ref: F, onSelect: (f) => {
|
3054
3225
|
var y;
|
3055
|
-
(y =
|
3056
|
-
const
|
3057
|
-
|
3226
|
+
(y = re.get(oe.name)) == null || y.dispose();
|
3227
|
+
const g = ae.get(f);
|
3228
|
+
g !== void 0 && (K(oe), oe = g, O(g, F.current));
|
3058
3229
|
} })
|
3059
3230
|
] }),
|
3060
|
-
n === "Quad" && /* @__PURE__ */
|
3061
|
-
/* @__PURE__ */
|
3231
|
+
n === "Quad" && /* @__PURE__ */ u.jsxs(u.Fragment, { children: [
|
3232
|
+
/* @__PURE__ */ u.jsx(ke, { camera: $, options: te, ref: S, onSelect: (f) => {
|
3062
3233
|
var y;
|
3063
|
-
(y =
|
3064
|
-
const
|
3065
|
-
|
3234
|
+
(y = re.get($.name)) == null || y.dispose();
|
3235
|
+
const g = ae.get(f);
|
3236
|
+
g !== void 0 && (K($), $ = g, O(g, S.current));
|
3066
3237
|
} }),
|
3067
|
-
/* @__PURE__ */
|
3238
|
+
/* @__PURE__ */ u.jsx(ke, { camera: oe, options: te, ref: F, onSelect: (f) => {
|
3068
3239
|
var y;
|
3069
|
-
(y =
|
3070
|
-
const
|
3071
|
-
|
3240
|
+
(y = re.get(oe.name)) == null || y.dispose();
|
3241
|
+
const g = ae.get(f);
|
3242
|
+
g !== void 0 && (K(oe), oe = g, O(g, F.current));
|
3072
3243
|
} }),
|
3073
|
-
/* @__PURE__ */
|
3244
|
+
/* @__PURE__ */ u.jsx(ke, { camera: Ae, options: te, ref: Q, onSelect: (f) => {
|
3074
3245
|
var y;
|
3075
|
-
(y =
|
3076
|
-
const
|
3077
|
-
|
3246
|
+
(y = re.get(Ae.name)) == null || y.dispose();
|
3247
|
+
const g = ae.get(f);
|
3248
|
+
g !== void 0 && (K(Ae), Ae = g, O(g, Q.current));
|
3078
3249
|
} }),
|
3079
|
-
/* @__PURE__ */
|
3250
|
+
/* @__PURE__ */ u.jsx(ke, { camera: De, options: te, ref: H, onSelect: (f) => {
|
3080
3251
|
var y;
|
3081
|
-
(y =
|
3082
|
-
const
|
3083
|
-
|
3252
|
+
(y = re.get(De.name)) == null || y.dispose();
|
3253
|
+
const g = ae.get(f);
|
3254
|
+
g !== void 0 && (K(De), De = g, O(g, H.current));
|
3084
3255
|
} })
|
3085
3256
|
] })
|
3086
3257
|
] }),
|
3087
|
-
/* @__PURE__ */
|
3088
|
-
/* @__PURE__ */
|
3089
|
-
|
3258
|
+
/* @__PURE__ */ u.jsxs("div", { className: "settings", children: [
|
3259
|
+
/* @__PURE__ */ u.jsx(
|
3260
|
+
Et,
|
3090
3261
|
{
|
3091
|
-
index:
|
3092
|
-
options:
|
3093
|
-
onSelect: (
|
3094
|
-
|
3262
|
+
index: en.indexOf(n),
|
3263
|
+
options: en,
|
3264
|
+
onSelect: (f) => {
|
3265
|
+
f !== n && (de(), a(f));
|
3266
|
+
},
|
3267
|
+
open: s,
|
3268
|
+
onToggle: (f) => {
|
3269
|
+
c(f), l && d(!1), p && m(!1);
|
3095
3270
|
}
|
3096
3271
|
}
|
3097
3272
|
),
|
3098
|
-
/* @__PURE__ */
|
3099
|
-
|
3273
|
+
/* @__PURE__ */ u.jsx(
|
3274
|
+
Et,
|
3100
3275
|
{
|
3101
|
-
index:
|
3102
|
-
options:
|
3103
|
-
onSelect: (
|
3104
|
-
if (
|
3105
|
-
switch (
|
3276
|
+
index: tn.indexOf(bt),
|
3277
|
+
options: tn,
|
3278
|
+
onSelect: (f) => {
|
3279
|
+
if (f !== bt)
|
3280
|
+
switch (bt = f, bt) {
|
3106
3281
|
case "Depth":
|
3107
|
-
|
3282
|
+
G.overrideMaterial = Na;
|
3108
3283
|
break;
|
3109
3284
|
case "Normals":
|
3110
|
-
|
3285
|
+
G.overrideMaterial = La;
|
3111
3286
|
break;
|
3112
3287
|
default:
|
3113
3288
|
case "Renderer":
|
3114
|
-
|
3289
|
+
G.overrideMaterial = null;
|
3115
3290
|
break;
|
3116
3291
|
case "Wireframe":
|
3117
|
-
|
3292
|
+
G.overrideMaterial = Ua;
|
3118
3293
|
break;
|
3119
3294
|
case "UVs":
|
3120
|
-
|
3295
|
+
G.overrideMaterial = Fa;
|
3121
3296
|
break;
|
3122
3297
|
}
|
3298
|
+
},
|
3299
|
+
open: l,
|
3300
|
+
onToggle: (f) => {
|
3301
|
+
s && c(!1), d(f), p && m(!1);
|
3302
|
+
}
|
3303
|
+
}
|
3304
|
+
),
|
3305
|
+
/* @__PURE__ */ u.jsx(
|
3306
|
+
Et,
|
3307
|
+
{
|
3308
|
+
index: 0,
|
3309
|
+
options: [
|
3310
|
+
"Orbit Mode",
|
3311
|
+
"Selection Mode"
|
3312
|
+
],
|
3313
|
+
onSelect: (f) => {
|
3314
|
+
yt = f === "Selection Mode", it.visible = yt;
|
3315
|
+
},
|
3316
|
+
open: p,
|
3317
|
+
onToggle: (f) => {
|
3318
|
+
s && c(!1), l && d(!1), m(f);
|
3123
3319
|
}
|
3124
3320
|
}
|
3125
3321
|
)
|
3126
3322
|
] })
|
3127
3323
|
] });
|
3128
3324
|
}
|
3129
|
-
function
|
3130
|
-
return /* @__PURE__ */
|
3131
|
-
/* @__PURE__ */
|
3325
|
+
function oi(t) {
|
3326
|
+
return /* @__PURE__ */ u.jsxs("div", { className: "editor", ref: t.ref, style: t.style, children: [
|
3327
|
+
/* @__PURE__ */ u.jsx("header", { children: t.header }),
|
3132
3328
|
t.children,
|
3133
|
-
/* @__PURE__ */
|
3329
|
+
/* @__PURE__ */ u.jsx("footer", { children: t.footer })
|
3134
3330
|
] });
|
3135
3331
|
}
|
3136
3332
|
export {
|
3137
|
-
|
3138
|
-
|
3139
|
-
|
3140
|
-
|
3141
|
-
|
3142
|
-
|
3143
|
-
|
3144
|
-
|
3145
|
-
|
3146
|
-
|
3147
|
-
|
3148
|
-
|
3149
|
-
|
3150
|
-
|
3151
|
-
|
3152
|
-
|
3153
|
-
|
3154
|
-
|
3155
|
-
|
3156
|
-
|
3157
|
-
|
3158
|
-
|
3159
|
-
|
3160
|
-
|
3161
|
-
|
3162
|
-
|
3163
|
-
|
3164
|
-
|
3165
|
-
|
3166
|
-
|
3167
|
-
|
3168
|
-
|
3169
|
-
|
3170
|
-
|
3171
|
-
|
3172
|
-
|
3333
|
+
Lt as Accordion,
|
3334
|
+
Za as Application,
|
3335
|
+
xt as BaseRemote,
|
3336
|
+
gn as ChildObject,
|
3337
|
+
ya as ContainerObject,
|
3338
|
+
la as Draggable,
|
3339
|
+
ca as DraggableItem,
|
3340
|
+
ua as Dropdown,
|
3341
|
+
da as DropdownItem,
|
3342
|
+
oi as Editor,
|
3343
|
+
ma as InfiniteGridHelper,
|
3344
|
+
Aa as Inspector,
|
3345
|
+
ri as MultiView,
|
3346
|
+
mn as NavButton,
|
3347
|
+
Ja as RemoteComponents,
|
3348
|
+
ni as RemoteController,
|
3349
|
+
Qa as RemoteTheatre,
|
3350
|
+
ei as RemoteThree,
|
3351
|
+
ti as RemoteTweakpane,
|
3352
|
+
ii as SceneInspector,
|
3353
|
+
ai as SidePanel,
|
3354
|
+
A as ToolEvents,
|
3355
|
+
ba as UVMaterial,
|
3356
|
+
Ka as clamp,
|
3357
|
+
Jn as colorToHex,
|
3358
|
+
k as debugDispatcher,
|
3359
|
+
fn as dispose,
|
3360
|
+
ea as disposeMaterial,
|
3361
|
+
qa as disposeTexture,
|
3362
|
+
Xa as distance,
|
3363
|
+
dn as hierarchyUUID,
|
3364
|
+
Zn as isColor,
|
3365
|
+
qn as randomID,
|
3366
|
+
Qn as resetThreeObjects,
|
3367
|
+
Rt as round,
|
3368
|
+
At as totalThreeObjects
|
3173
3369
|
};
|