@billtaofbj/explosion-3d 1.0.0 → 1.1.0
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/explosion-3d.css +1 -1
- package/dist/index.cjs.js +3 -3
- package/dist/index.es.js +1059 -998
- package/package.json +34 -27
package/dist/index.es.js
CHANGED
|
@@ -2,40 +2,40 @@ import { Fragment as e, computed as t, createBlock as n, createCommentVNode as r
|
|
|
2
2
|
import { BrandWatermark as D } from "@billtaofbj/core";
|
|
3
3
|
import { useRoute as O, useRouter as k } from "vue-router";
|
|
4
4
|
import { ElMessage as A } from "element-plus";
|
|
5
|
-
import { Aim as
|
|
6
|
-
import
|
|
7
|
-
import * as
|
|
8
|
-
import { AnimationClip as
|
|
9
|
-
import * as
|
|
10
|
-
import { HocuspocusProvider as
|
|
5
|
+
import { Aim as j, ArrowDown as M, ArrowLeft as ee, Bell as te, Box as N, Clock as ne, Close as re, Coin as P, Delete as F, Download as I, Expand as ie, Fold as ae, Grid as L, Link as oe, Loading as se, Monitor as ce, Promotion as le, Search as ue, SetUp as de, Share as fe, ShoppingBag as pe, Upload as me } from "@element-plus/icons-vue";
|
|
6
|
+
import R from "axios";
|
|
7
|
+
import * as z from "three";
|
|
8
|
+
import { AnimationClip as he, Bone as ge, Box3 as _e, BoxGeometry as B, BufferAttribute as ve, BufferGeometry as ye, ClampToEdgeWrapping as be, Color as xe, ColorManagement as Se, Controls as Ce, CylinderGeometry as V, DirectionalLight as we, DoubleSide as Te, Euler as Ee, FileLoader as De, Float32BufferAttribute as Oe, FrontSide as ke, Group as Ae, ImageBitmapLoader as je, InstancedBufferAttribute as Me, InstancedMesh as Ne, InterleavedBuffer as H, InterleavedBufferAttribute as Pe, Interpolant as Fe, InterpolateDiscrete as Ie, InterpolateLinear as Le, Line as Re, LineBasicMaterial as ze, LineLoop as Be, LineSegments as Ve, LinearFilter as He, LinearMipmapLinearFilter as Ue, LinearMipmapNearestFilter as We, LinearSRGBColorSpace as Ge, Loader as Ke, LoaderUtils as qe, MOUSE as Je, Material as Ye, MathUtils as Xe, Matrix4 as Ze, Mesh as U, MeshBasicMaterial as Qe, MeshPhongMaterial as $e, MeshPhysicalMaterial as et, MeshStandardMaterial as tt, MirroredRepeatWrapping as nt, NearestFilter as rt, NearestMipmapLinearFilter as it, NearestMipmapNearestFilter as at, NumberKeyframeTrack as ot, Object3D as st, OctahedronGeometry as ct, OrthographicCamera as lt, PerspectiveCamera as ut, Plane as dt, PlaneGeometry as ft, PointLight as pt, Points as mt, PointsMaterial as ht, PropertyBinding as gt, Quaternion as W, QuaternionKeyframeTrack as _t, Ray as vt, Raycaster as yt, RepeatWrapping as bt, SRGBColorSpace as xt, Skeleton as St, SkinnedMesh as Ct, Sphere as wt, SphereGeometry as Tt, Spherical as Et, SpotLight as Dt, TOUCH as Ot, Texture as kt, TextureLoader as At, TorusGeometry as jt, TriangleFanDrawMode as Mt, TriangleStripDrawMode as Nt, TrianglesDrawMode as Pt, Vector2 as G, Vector3 as K, VectorKeyframeTrack as Ft } from "three";
|
|
9
|
+
import * as It from "yjs";
|
|
10
|
+
import { HocuspocusProvider as Lt } from "@hocuspocus/provider";
|
|
11
11
|
//#region \0rolldown/runtime.js
|
|
12
|
-
var
|
|
12
|
+
var Rt = Object.defineProperty, zt = (e, t) => {
|
|
13
13
|
let n = {};
|
|
14
|
-
for (var r in e)
|
|
14
|
+
for (var r in e) Rt(n, r, {
|
|
15
15
|
get: e[r],
|
|
16
16
|
enumerable: !0
|
|
17
17
|
});
|
|
18
|
-
return t ||
|
|
19
|
-
},
|
|
18
|
+
return t || Rt(n, Symbol.toStringTag, { value: "Module" }), n;
|
|
19
|
+
}, Bt = (e, t) => {
|
|
20
20
|
let n = e.__vccOpts || e;
|
|
21
21
|
for (let [e, r] of t) n[e] = r;
|
|
22
22
|
return n;
|
|
23
|
-
},
|
|
23
|
+
}, Vt = { class: "chat-header" }, Ht = { class: "chat-header-left" }, Ut = { class: "chat-title" }, Wt = { class: "online-users-list" }, Gt = { class: "online-user-item" }, Kt = { class: "online-user-name" }, qt = { key: 1 }, Jt = { class: "online-user-name" }, Yt = { class: "chat-header-right" }, Xt = {
|
|
24
24
|
key: 0,
|
|
25
25
|
class: "chat-empty"
|
|
26
|
-
},
|
|
26
|
+
}, Zt = { class: "chat-empty-hint" }, Qt = { key: 1 }, $t = { class: "message-content" }, en = {
|
|
27
27
|
key: 0,
|
|
28
28
|
class: "message-meta"
|
|
29
|
-
},
|
|
29
|
+
}, tn = {
|
|
30
30
|
key: 0,
|
|
31
31
|
class: "message-mention"
|
|
32
|
-
},
|
|
32
|
+
}, nn = ["innerHTML"], rn = { class: "message-time" }, an = {
|
|
33
33
|
key: 1,
|
|
34
34
|
class: "chat-message chat-message-ai"
|
|
35
|
-
},
|
|
35
|
+
}, on = { class: "message-avatar ai" }, sn = { class: "chat-input-area" }, cn = {
|
|
36
36
|
key: 0,
|
|
37
37
|
class: "mention-popup"
|
|
38
|
-
},
|
|
38
|
+
}, ln = ["onClick", "onMouseenter"], un = { key: 1 }, dn = /*#__PURE__*/ Bt({
|
|
39
39
|
__name: "AiChatPanel",
|
|
40
40
|
props: {
|
|
41
41
|
visible: {
|
|
@@ -86,44 +86,44 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
86
86
|
"clear-unread"
|
|
87
87
|
],
|
|
88
88
|
setup(c, { emit: l }) {
|
|
89
|
-
let p = c, m = l, g = _(""), b = _(null), D = _(null), O = _(!1), k = _([]), A = _(0),
|
|
89
|
+
let p = c, m = l, g = _(""), b = _(null), D = _(null), O = _(!1), k = _([]), A = _(0), j = "", M = -1, ee = {
|
|
90
90
|
id: "ai-assistant",
|
|
91
91
|
name: "AI助手",
|
|
92
92
|
color: "#409EFF",
|
|
93
93
|
isAi: !0
|
|
94
|
-
},
|
|
94
|
+
}, N = t(() => {
|
|
95
95
|
let e = p.currentUser.id, t = /* @__PURE__ */ new Set();
|
|
96
|
-
return [
|
|
96
|
+
return [ee, ...p.collabUsers.filter((n) => {
|
|
97
97
|
let r = n.clientId || n.id || "";
|
|
98
98
|
if (r && r === e) return !1;
|
|
99
99
|
let i = String(r || n.name || "");
|
|
100
100
|
return t.has(i) ? !1 : (t.add(i), !0);
|
|
101
101
|
})];
|
|
102
|
-
}),
|
|
102
|
+
}), ne = t(() => N.value.length + 1), P = (e) => e.role === "ai" ? "chat-message-ai" : p.isCollab && e.user_id && e.user_id !== p.currentUser.id ? "chat-message-other" : "chat-message-user", I = (e) => e.role === "ai" ? { background: "linear-gradient(135deg, #409EFF, #337ECC)" } : { background: e.user_color || "#67C23A" }, ie = (e) => (e.user_name || "U").charAt(0), ae = (e) => {
|
|
103
103
|
if (!p.isCollab) return;
|
|
104
104
|
let t = typeof e == "string" ? e : e.target?.value || g.value, n = t.length, r = t.lastIndexOf("@", n);
|
|
105
105
|
if (r !== -1 && r < n) {
|
|
106
106
|
let e = t.slice(r + 1, n);
|
|
107
107
|
if (!e.includes(" ") && !e.includes("\n")) {
|
|
108
|
-
|
|
108
|
+
j = e, M = r, k.value = N.value.filter((t) => t.name && t.name.toLowerCase().includes(e.toLowerCase())), O.value = k.value.length > 0, A.value = 0;
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
}
|
|
112
112
|
O.value = !1;
|
|
113
|
-
},
|
|
113
|
+
}, L = () => {
|
|
114
114
|
O.value && (A.value = Math.min(A.value + 1, k.value.length - 1));
|
|
115
|
-
},
|
|
115
|
+
}, oe = () => {
|
|
116
116
|
O.value && (A.value = Math.max(A.value - 1, 0));
|
|
117
|
-
},
|
|
118
|
-
let t = g.value.slice(0,
|
|
117
|
+
}, se = (e) => {
|
|
118
|
+
let t = g.value.slice(0, M), n = g.value.slice(M + j.length + 1);
|
|
119
119
|
g.value = `${t}@${e.name} ${n}`, O.value = !1;
|
|
120
|
-
},
|
|
120
|
+
}, ue = (e) => {
|
|
121
121
|
if (e) {
|
|
122
122
|
if (e.shiftKey) return;
|
|
123
123
|
if (O.value) {
|
|
124
124
|
let t = k.value[A.value];
|
|
125
125
|
if (t) {
|
|
126
|
-
e.preventDefault(),
|
|
126
|
+
e.preventDefault(), se(t);
|
|
127
127
|
return;
|
|
128
128
|
}
|
|
129
129
|
}
|
|
@@ -137,27 +137,27 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
137
137
|
e && (n = e[1]);
|
|
138
138
|
}
|
|
139
139
|
m("send", t, { mentionedUser: n }), g.value = "", O.value = !1;
|
|
140
|
-
},
|
|
140
|
+
}, de = () => {
|
|
141
141
|
u(() => {
|
|
142
142
|
b.value && (b.value.scrollTop = b.value.scrollHeight);
|
|
143
143
|
});
|
|
144
144
|
};
|
|
145
|
-
return C(() => p.messages.length,
|
|
146
|
-
let u = y("el-icon"), p = y("el-tag"), _ = y("el-popover"), C = y("el-button"),
|
|
145
|
+
return C(() => p.messages.length, de), C(() => p.messages, de, { deep: !0 }), (t, l) => {
|
|
146
|
+
let u = y("el-icon"), p = y("el-tag"), _ = y("el-popover"), C = y("el-button"), j = y("el-input");
|
|
147
147
|
return c.visible ? (h(), i("div", {
|
|
148
148
|
key: 0,
|
|
149
149
|
class: "ai-chat-panel",
|
|
150
150
|
style: f({ width: c.panelWidth + "px" })
|
|
151
151
|
}, [
|
|
152
|
-
a("div",
|
|
152
|
+
a("div", Vt, [a("div", Ht, [
|
|
153
153
|
s(u, {
|
|
154
154
|
size: 18,
|
|
155
155
|
color: "#409EFF"
|
|
156
156
|
}, {
|
|
157
|
-
default: w(() => [s(S(
|
|
157
|
+
default: w(() => [s(S(ce))]),
|
|
158
158
|
_: 1
|
|
159
159
|
}),
|
|
160
|
-
a("span",
|
|
160
|
+
a("span", Ut, x(c.isCollab ? "协作聊天" : "AI 助手"), 1),
|
|
161
161
|
c.isCollab ? (h(), n(_, {
|
|
162
162
|
key: 0,
|
|
163
163
|
width: 200,
|
|
@@ -170,15 +170,15 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
170
170
|
effect: "plain",
|
|
171
171
|
class: "online-tag"
|
|
172
172
|
}, {
|
|
173
|
-
default: w(() => [o(x(
|
|
173
|
+
default: w(() => [o(x(ne.value) + "人在线 ", 1)]),
|
|
174
174
|
_: 1
|
|
175
175
|
})]),
|
|
176
|
-
default: w(() => [a("div",
|
|
176
|
+
default: w(() => [a("div", Wt, [a("div", Gt, [
|
|
177
177
|
a("div", {
|
|
178
178
|
class: "online-user-avatar",
|
|
179
179
|
style: f({ background: c.currentUser.color || "#409EFF" })
|
|
180
180
|
}, x((c.currentUser.name || "U").charAt(0)), 5),
|
|
181
|
-
a("span",
|
|
181
|
+
a("span", Kt, x(c.currentUser.name || "我"), 1),
|
|
182
182
|
s(p, {
|
|
183
183
|
size: "small",
|
|
184
184
|
type: c.isOwner ? "warning" : "success",
|
|
@@ -189,7 +189,7 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
189
189
|
_: 1
|
|
190
190
|
}, 8, ["type"]),
|
|
191
191
|
l[4] ||= a("span", { class: "self-tag" }, "(我)", -1)
|
|
192
|
-
]), (h(!0), i(e, null, v(
|
|
192
|
+
]), (h(!0), i(e, null, v(N.value, (e) => (h(), i("div", {
|
|
193
193
|
key: e.id || e.clientId,
|
|
194
194
|
class: "online-user-item"
|
|
195
195
|
}, [
|
|
@@ -200,10 +200,10 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
200
200
|
key: 0,
|
|
201
201
|
size: 14
|
|
202
202
|
}, {
|
|
203
|
-
default: w(() => [s(S(
|
|
203
|
+
default: w(() => [s(S(ce))]),
|
|
204
204
|
_: 1
|
|
205
|
-
})) : (h(), i("span",
|
|
206
|
-
a("span",
|
|
205
|
+
})) : (h(), i("span", qt, x((e.name || "U").charAt(0)), 1))], 4),
|
|
206
|
+
a("span", Jt, x(e.name || "未知用户"), 1),
|
|
207
207
|
e.isAi ? (h(), n(p, {
|
|
208
208
|
key: 0,
|
|
209
209
|
size: "small",
|
|
@@ -226,7 +226,7 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
226
226
|
]))), 128))])]),
|
|
227
227
|
_: 1
|
|
228
228
|
})) : r("", !0)
|
|
229
|
-
]), a("div",
|
|
229
|
+
]), a("div", Yt, [
|
|
230
230
|
c.isCollab && c.unreadMention ? (h(), i("div", {
|
|
231
231
|
key: 0,
|
|
232
232
|
class: "mention-bell",
|
|
@@ -236,7 +236,7 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
236
236
|
size: 18,
|
|
237
237
|
color: "#F56C6C"
|
|
238
238
|
}, {
|
|
239
|
-
default: w(() => [s(S(
|
|
239
|
+
default: w(() => [s(S(te))]),
|
|
240
240
|
_: 1
|
|
241
241
|
})])) : r("", !0),
|
|
242
242
|
s(C, {
|
|
@@ -247,7 +247,7 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
247
247
|
title: "清空对话"
|
|
248
248
|
}, {
|
|
249
249
|
default: w(() => [s(u, null, {
|
|
250
|
-
default: w(() => [s(S(
|
|
250
|
+
default: w(() => [s(S(F))]),
|
|
251
251
|
_: 1
|
|
252
252
|
})]),
|
|
253
253
|
_: 1
|
|
@@ -260,7 +260,7 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
260
260
|
title: "关闭"
|
|
261
261
|
}, {
|
|
262
262
|
default: w(() => [s(u, null, {
|
|
263
|
-
default: w(() => [s(S(
|
|
263
|
+
default: w(() => [s(S(re))]),
|
|
264
264
|
_: 1
|
|
265
265
|
})]),
|
|
266
266
|
_: 1
|
|
@@ -271,42 +271,42 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
271
271
|
ref_key: "messagesRef",
|
|
272
272
|
ref: b
|
|
273
273
|
}, [
|
|
274
|
-
c.messages.length === 0 ? (h(), i("div",
|
|
274
|
+
c.messages.length === 0 ? (h(), i("div", Xt, [
|
|
275
275
|
s(u, {
|
|
276
276
|
size: 40,
|
|
277
277
|
color: "#c0c4cc"
|
|
278
278
|
}, {
|
|
279
|
-
default: w(() => [s(S(
|
|
279
|
+
default: w(() => [s(S(ce))]),
|
|
280
280
|
_: 1
|
|
281
281
|
}),
|
|
282
282
|
a("p", null, x(c.isCollab ? "协作聊天室" : "你好!我是 AI 助手"), 1),
|
|
283
|
-
a("p",
|
|
283
|
+
a("p", Zt, x(c.isCollab ? "与团队成员和AI助手实时聊天" : "可以问我任何关于文档编辑的问题"), 1)
|
|
284
284
|
])) : r("", !0),
|
|
285
285
|
(h(!0), i(e, null, v(c.messages, (e) => (h(), i("div", {
|
|
286
286
|
key: e._msgId || e.time + e.content,
|
|
287
|
-
class: d(["chat-message",
|
|
287
|
+
class: d(["chat-message", P(e)])
|
|
288
288
|
}, [a("div", {
|
|
289
289
|
class: "message-avatar",
|
|
290
|
-
style: f(
|
|
290
|
+
style: f(I(e))
|
|
291
291
|
}, [e.role === "ai" ? (h(), n(u, {
|
|
292
292
|
key: 0,
|
|
293
293
|
size: 16
|
|
294
294
|
}, {
|
|
295
|
-
default: w(() => [s(S(
|
|
295
|
+
default: w(() => [s(S(ce))]),
|
|
296
296
|
_: 1
|
|
297
|
-
})) : (h(), i("span",
|
|
298
|
-
c.isCollab && e.role === "user" ? (h(), i("div",
|
|
297
|
+
})) : (h(), i("span", Qt, x(ie(e)), 1))], 4), a("div", $t, [
|
|
298
|
+
c.isCollab && e.role === "user" ? (h(), i("div", en, [a("span", {
|
|
299
299
|
class: "message-sender",
|
|
300
300
|
style: f({ color: e.user_color || "#67C23A" })
|
|
301
|
-
}, x(e.user_name || "用户"), 5), e.mentioned_user ? (h(), i("span",
|
|
301
|
+
}, x(e.user_name || "用户"), 5), e.mentioned_user ? (h(), i("span", tn, "@" + x(e.mentioned_user), 1)) : r("", !0)])) : r("", !0),
|
|
302
302
|
a("div", {
|
|
303
303
|
class: "message-text",
|
|
304
304
|
innerHTML: e.content
|
|
305
|
-
}, null, 8,
|
|
306
|
-
a("div",
|
|
305
|
+
}, null, 8, nn),
|
|
306
|
+
a("div", rn, x(e.time), 1)
|
|
307
307
|
])], 2))), 128)),
|
|
308
|
-
c.loading ? (h(), i("div",
|
|
309
|
-
default: w(() => [s(S(
|
|
308
|
+
c.loading ? (h(), i("div", an, [a("div", on, [s(u, { size: 16 }, {
|
|
309
|
+
default: w(() => [s(S(ce))]),
|
|
310
310
|
_: 1
|
|
311
311
|
})]), l[7] ||= a("div", { class: "message-content" }, [a("div", { class: "message-text typing-indicator" }, [
|
|
312
312
|
a("span"),
|
|
@@ -314,12 +314,12 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
314
314
|
a("span")
|
|
315
315
|
])], -1)])) : r("", !0)
|
|
316
316
|
], 512),
|
|
317
|
-
a("div",
|
|
317
|
+
a("div", sn, [a("div", {
|
|
318
318
|
class: "chat-input-wrapper",
|
|
319
319
|
ref_key: "inputWrapperRef",
|
|
320
320
|
ref: D
|
|
321
321
|
}, [
|
|
322
|
-
s(
|
|
322
|
+
s(j, {
|
|
323
323
|
modelValue: g.value,
|
|
324
324
|
"onUpdate:modelValue": l[3] ||= (e) => g.value = e,
|
|
325
325
|
type: "textarea",
|
|
@@ -329,9 +329,9 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
329
329
|
},
|
|
330
330
|
placeholder: c.isCollab ? "输入消息... @提及成员" : "输入消息...",
|
|
331
331
|
onKeydown: [
|
|
332
|
-
T(E(
|
|
333
|
-
T(E(
|
|
334
|
-
T(E(
|
|
332
|
+
T(E(ue, ["exact"]), ["enter"]),
|
|
333
|
+
T(E(L, ["prevent"]), ["down"]),
|
|
334
|
+
T(E(oe, ["prevent"]), ["up"])
|
|
335
335
|
],
|
|
336
336
|
onInput: ae,
|
|
337
337
|
resize: "none"
|
|
@@ -340,10 +340,10 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
340
340
|
"placeholder",
|
|
341
341
|
"onKeydown"
|
|
342
342
|
]),
|
|
343
|
-
O.value ? (h(), i("div",
|
|
343
|
+
O.value ? (h(), i("div", cn, [(h(!0), i(e, null, v(k.value, (e, t) => (h(), i("div", {
|
|
344
344
|
key: e.id || e.clientId,
|
|
345
345
|
class: d(["mention-item", { active: t === A.value }]),
|
|
346
|
-
onClick: (t) =>
|
|
346
|
+
onClick: (t) => se(e),
|
|
347
347
|
onMouseenter: (e) => A.value = t
|
|
348
348
|
}, [a("div", {
|
|
349
349
|
class: "mention-avatar",
|
|
@@ -352,18 +352,18 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
352
352
|
key: 0,
|
|
353
353
|
size: 12
|
|
354
354
|
}, {
|
|
355
|
-
default: w(() => [s(S(
|
|
355
|
+
default: w(() => [s(S(ce))]),
|
|
356
356
|
_: 1
|
|
357
|
-
})) : (h(), i("span",
|
|
357
|
+
})) : (h(), i("span", un, x((e.name || "U").charAt(0)), 1))], 4), a("span", null, x(e.name), 1)], 42, ln))), 128))])) : r("", !0),
|
|
358
358
|
s(C, {
|
|
359
359
|
class: "send-btn",
|
|
360
360
|
type: "primary",
|
|
361
361
|
circle: "",
|
|
362
362
|
disabled: !g.value.trim() || c.loading,
|
|
363
|
-
onClick:
|
|
363
|
+
onClick: ue
|
|
364
364
|
}, {
|
|
365
365
|
default: w(() => [s(u, null, {
|
|
366
|
-
default: w(() => [s(S(
|
|
366
|
+
default: w(() => [s(S(le))]),
|
|
367
367
|
_: 1
|
|
368
368
|
})]),
|
|
369
369
|
_: 1
|
|
@@ -375,7 +375,7 @@ var Bt = Object.defineProperty, Vt = (e, t) => {
|
|
|
375
375
|
}, [["__scopeId", "data-v-01960100"]]);
|
|
376
376
|
//#endregion
|
|
377
377
|
//#region ../../src/composables/useChat.js
|
|
378
|
-
function
|
|
378
|
+
function fn() {
|
|
379
379
|
let e = _([]), t = _(!1), n = _(!1), r = _([]), i = _({
|
|
380
380
|
id: "",
|
|
381
381
|
name: "",
|
|
@@ -431,7 +431,7 @@ function mn() {
|
|
|
431
431
|
console.warn("[useChat] Failed to push to Y.Array:", e);
|
|
432
432
|
}
|
|
433
433
|
if (r.roomId) try {
|
|
434
|
-
await
|
|
434
|
+
await R.post(u, {
|
|
435
435
|
room_id: r.roomId,
|
|
436
436
|
role: "user",
|
|
437
437
|
content: t,
|
|
@@ -457,7 +457,7 @@ function mn() {
|
|
|
457
457
|
console.warn("[useChat] Failed to push AI message to Y.Array:", e);
|
|
458
458
|
}
|
|
459
459
|
if (r) try {
|
|
460
|
-
await
|
|
460
|
+
await R.post(u, {
|
|
461
461
|
room_id: r,
|
|
462
462
|
role: "ai",
|
|
463
463
|
content: t,
|
|
@@ -469,7 +469,7 @@ function mn() {
|
|
|
469
469
|
}
|
|
470
470
|
}, b = async (t) => {
|
|
471
471
|
if (t) try {
|
|
472
|
-
let n = await
|
|
472
|
+
let n = await R.get(u, { params: { room_id: t } });
|
|
473
473
|
if (Array.isArray(n.data)) {
|
|
474
474
|
let t = n.data.map((e) => ({
|
|
475
475
|
_msgId: e._msgId || `hist-${e.id || Date.now()}`,
|
|
@@ -488,7 +488,7 @@ function mn() {
|
|
|
488
488
|
}
|
|
489
489
|
}, x = async (t) => {
|
|
490
490
|
if (e.value = [], l.clear(), t) try {
|
|
491
|
-
await
|
|
491
|
+
await R.delete(u, { params: { room_id: t } });
|
|
492
492
|
} catch (e) {
|
|
493
493
|
console.warn("[useChat] Failed to clear messages on server:", e);
|
|
494
494
|
}
|
|
@@ -523,7 +523,7 @@ function mn() {
|
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region ../../src/composables/useVersionHistory.js
|
|
526
|
-
var
|
|
526
|
+
var pn = "/api/document-versions", mn = 5e3, hn = () => {
|
|
527
527
|
let e = _([]), t = _(!1);
|
|
528
528
|
return {
|
|
529
529
|
versions: e,
|
|
@@ -531,13 +531,13 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
531
531
|
saveVersion: async ({ documentId: e, docType: t, content: n, userId: r, userName: i }) => {
|
|
532
532
|
if (!e || !t || !n) return null;
|
|
533
533
|
try {
|
|
534
|
-
let { data: a } = await
|
|
534
|
+
let { data: a } = await R.post(pn, {
|
|
535
535
|
document_id: e,
|
|
536
536
|
doc_type: t,
|
|
537
537
|
content: typeof n == "string" ? n : JSON.stringify(n),
|
|
538
538
|
user_id: r || null,
|
|
539
539
|
user_name: i || null
|
|
540
|
-
}, { timeout:
|
|
540
|
+
}, { timeout: mn });
|
|
541
541
|
return a;
|
|
542
542
|
} catch (e) {
|
|
543
543
|
return console.warn("[useVersionHistory] Failed to save version:", e), null;
|
|
@@ -547,9 +547,9 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
547
547
|
if (!n) return [];
|
|
548
548
|
t.value = !0;
|
|
549
549
|
try {
|
|
550
|
-
let { data: t } = await
|
|
550
|
+
let { data: t } = await R.get(pn, {
|
|
551
551
|
params: { document_id: n },
|
|
552
|
-
timeout:
|
|
552
|
+
timeout: mn
|
|
553
553
|
});
|
|
554
554
|
return e.value = t, t;
|
|
555
555
|
} catch (t) {
|
|
@@ -560,26 +560,26 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
560
560
|
},
|
|
561
561
|
getVersionContent: async (e) => {
|
|
562
562
|
try {
|
|
563
|
-
let { data: t } = await
|
|
563
|
+
let { data: t } = await R.get(`${pn}/${e}`, { timeout: mn });
|
|
564
564
|
return t;
|
|
565
565
|
} catch (e) {
|
|
566
566
|
return console.warn("[useVersionHistory] Failed to get version content:", e), null;
|
|
567
567
|
}
|
|
568
568
|
}
|
|
569
569
|
};
|
|
570
|
-
},
|
|
570
|
+
}, gn = { class: "version-history-panel" }, _n = {
|
|
571
571
|
key: 0,
|
|
572
572
|
class: "loading-state"
|
|
573
|
-
},
|
|
573
|
+
}, vn = {
|
|
574
574
|
key: 1,
|
|
575
575
|
class: "empty-state"
|
|
576
|
-
},
|
|
576
|
+
}, yn = {
|
|
577
577
|
key: 2,
|
|
578
578
|
class: "version-list"
|
|
579
|
-
},
|
|
579
|
+
}, bn = {
|
|
580
580
|
key: 0,
|
|
581
581
|
class: "current-version"
|
|
582
|
-
},
|
|
582
|
+
}, xn = { class: "current-version-header" }, Sn = { class: "version-number" }, Cn = ["onClick"], wn = { class: "version-number" }, Tn = { class: "version-user" }, En = { class: "panel-footer" }, Dn = /*#__PURE__*/ Bt({
|
|
583
583
|
__name: "VersionHistoryPanel",
|
|
584
584
|
props: {
|
|
585
585
|
modelValue: {
|
|
@@ -593,7 +593,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
593
593
|
},
|
|
594
594
|
emits: ["update:modelValue", "apply"],
|
|
595
595
|
setup(t, { expose: c, emit: l }) {
|
|
596
|
-
let u = t, f = l, { versions: p, loading: m, loadVersions: g, getVersionContent: b } =
|
|
596
|
+
let u = t, f = l, { versions: p, loading: m, loadVersions: g, getVersionContent: b } = hn(), T = _(!1), E = _(null), D = _(!1), O = _(null);
|
|
597
597
|
C(() => u.modelValue, (e) => {
|
|
598
598
|
T.value = e, e && u.documentId && (E.value = null, g(u.documentId).then((e) => {
|
|
599
599
|
e && e.length > 0 && (O.value = e[0]);
|
|
@@ -603,7 +603,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
603
603
|
});
|
|
604
604
|
let k = (e) => {
|
|
605
605
|
E.value = e;
|
|
606
|
-
},
|
|
606
|
+
}, j = async () => {
|
|
607
607
|
if (E.value) {
|
|
608
608
|
D.value = !0;
|
|
609
609
|
try {
|
|
@@ -613,9 +613,9 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
613
613
|
D.value = !1;
|
|
614
614
|
}
|
|
615
615
|
}
|
|
616
|
-
},
|
|
616
|
+
}, M = () => {
|
|
617
617
|
T.value = !1;
|
|
618
|
-
},
|
|
618
|
+
}, ee = (e) => {
|
|
619
619
|
if (!e) return "";
|
|
620
620
|
let t = new Date(e), n = (e) => String(e).padStart(2, "0");
|
|
621
621
|
return `${t.getFullYear()}-${n(t.getMonth() + 1)}-${n(t.getDate())} ${n(t.getHours())}:${n(t.getMinutes())}:${n(t.getSeconds())}`;
|
|
@@ -628,36 +628,36 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
628
628
|
title: "更新履历",
|
|
629
629
|
direction: "rtl",
|
|
630
630
|
size: "420px",
|
|
631
|
-
"before-close":
|
|
631
|
+
"before-close": M
|
|
632
632
|
}, {
|
|
633
|
-
footer: w(() => [a("div",
|
|
633
|
+
footer: w(() => [a("div", En, [s(_, {
|
|
634
634
|
type: "primary",
|
|
635
635
|
disabled: !E.value,
|
|
636
636
|
loading: D.value,
|
|
637
|
-
onClick:
|
|
637
|
+
onClick: j
|
|
638
638
|
}, {
|
|
639
639
|
default: w(() => [...c[4] ||= [o(" 切换到此版本 ", -1)]]),
|
|
640
640
|
_: 1
|
|
641
641
|
}, 8, ["disabled", "loading"])])]),
|
|
642
|
-
default: w(() => [a("div",
|
|
643
|
-
default: w(() => [s(S(
|
|
642
|
+
default: w(() => [a("div", gn, [S(m) ? (h(), i("div", _n, [s(l, { class: "is-loading" }, {
|
|
643
|
+
default: w(() => [s(S(se))]),
|
|
644
644
|
_: 1
|
|
645
|
-
}), c[1] ||= a("span", null, "加载中...", -1)])) : S(p).length === 0 ? (h(), i("div",
|
|
645
|
+
}), c[1] ||= a("span", null, "加载中...", -1)])) : S(p).length === 0 ? (h(), i("div", vn, [s(l, {
|
|
646
646
|
size: 48,
|
|
647
647
|
color: "#c0c4cc"
|
|
648
648
|
}, {
|
|
649
|
-
default: w(() => [s(S(
|
|
649
|
+
default: w(() => [s(S(ne))]),
|
|
650
650
|
_: 1
|
|
651
|
-
}), c[2] ||= a("p", null, "暂无历史版本", -1)])) : (h(), i("div",
|
|
651
|
+
}), c[2] ||= a("p", null, "暂无历史版本", -1)])) : (h(), i("div", yn, [O.value ? (h(), i("div", bn, [a("div", xn, [s(u, {
|
|
652
652
|
type: "success",
|
|
653
653
|
size: "small"
|
|
654
654
|
}, {
|
|
655
655
|
default: w(() => [...c[3] ||= [o("当前版本", -1)]]),
|
|
656
656
|
_: 1
|
|
657
|
-
}), a("span",
|
|
657
|
+
}), a("span", Sn, "v" + x(O.value.version_number), 1)])])) : r("", !0), s(g, null, {
|
|
658
658
|
default: w(() => [(h(!0), i(e, null, v(S(p), (e) => (h(), n(f, {
|
|
659
659
|
key: e.id,
|
|
660
|
-
timestamp:
|
|
660
|
+
timestamp: ee(e.created_at),
|
|
661
661
|
placement: "top",
|
|
662
662
|
type: E.value?.id === e.id ? "primary" : "",
|
|
663
663
|
hollow: E.value?.id !== e.id
|
|
@@ -665,7 +665,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
665
665
|
default: w(() => [a("div", {
|
|
666
666
|
class: d(["version-item", { active: E.value?.id === e.id }]),
|
|
667
667
|
onClick: (t) => k(e)
|
|
668
|
-
}, [a("span",
|
|
668
|
+
}, [a("span", wn, "版本号:v" + x(e.version_number), 1), a("span", Tn, "提交人:" + x(e.user_name || "未知用户"), 1)], 10, Cn)]),
|
|
669
669
|
_: 2
|
|
670
670
|
}, 1032, [
|
|
671
671
|
"timestamp",
|
|
@@ -678,10 +678,10 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
678
678
|
}, 8, ["modelValue"]);
|
|
679
679
|
};
|
|
680
680
|
}
|
|
681
|
-
}, [["__scopeId", "data-v-87924b7c"]]),
|
|
681
|
+
}, [["__scopeId", "data-v-87924b7c"]]), On = { class: "toolbar" }, kn = { class: "toolbar-left" }, An = { class: "toolbar-center" }, jn = { class: "toolbar-right" }, Mn = {
|
|
682
682
|
key: 0,
|
|
683
683
|
class: "collab-users"
|
|
684
|
-
},
|
|
684
|
+
}, Nn = ["title"], Pn = /*#__PURE__*/ Bt({
|
|
685
685
|
__name: "Toolbar",
|
|
686
686
|
props: {
|
|
687
687
|
title: {
|
|
@@ -717,14 +717,14 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
717
717
|
let c = t, l = _(c.title);
|
|
718
718
|
return C(() => c.title, (e) => l.value = e), (c, u) => {
|
|
719
719
|
let d = y("el-icon"), p = y("el-button"), m = y("el-input"), g = y("el-tooltip"), _ = y("el-divider"), b = y("el-dropdown-item"), C = y("el-dropdown-menu"), T = y("el-dropdown");
|
|
720
|
-
return h(), i("div",
|
|
721
|
-
a("div",
|
|
720
|
+
return h(), i("div", On, [
|
|
721
|
+
a("div", kn, [s(p, {
|
|
722
722
|
onClick: u[0] ||= (e) => c.$emit("back"),
|
|
723
723
|
size: "small",
|
|
724
724
|
circle: ""
|
|
725
725
|
}, {
|
|
726
726
|
default: w(() => [s(d, null, {
|
|
727
|
-
default: w(() => [s(S(
|
|
727
|
+
default: w(() => [s(S(ee))]),
|
|
728
728
|
_: 1
|
|
729
729
|
})]),
|
|
730
730
|
_: 1
|
|
@@ -736,7 +736,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
736
736
|
class: "title-input",
|
|
737
737
|
size: "small"
|
|
738
738
|
}, null, 8, ["modelValue"])]),
|
|
739
|
-
a("div",
|
|
739
|
+
a("div", An, [
|
|
740
740
|
s(g, {
|
|
741
741
|
content: "展开",
|
|
742
742
|
placement: "bottom"
|
|
@@ -747,7 +747,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
747
747
|
onClick: u[3] ||= (e) => c.$emit("explode")
|
|
748
748
|
}, {
|
|
749
749
|
default: w(() => [s(d, null, {
|
|
750
|
-
default: w(() => [s(S(
|
|
750
|
+
default: w(() => [s(S(ie))]),
|
|
751
751
|
_: 1
|
|
752
752
|
})]),
|
|
753
753
|
_: 1
|
|
@@ -795,7 +795,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
795
795
|
})]),
|
|
796
796
|
default: w(() => [s(p, { size: "small" }, {
|
|
797
797
|
default: w(() => [u[13] ||= o("展开方式", -1), s(d, { class: "el-icon--right" }, {
|
|
798
|
-
default: w(() => [s(S(
|
|
798
|
+
default: w(() => [s(S(M))]),
|
|
799
799
|
_: 1
|
|
800
800
|
})]),
|
|
801
801
|
_: 1
|
|
@@ -813,7 +813,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
813
813
|
onClick: u[6] ||= (e) => c.$emit("reset-camera")
|
|
814
814
|
}, {
|
|
815
815
|
default: w(() => [s(d, null, {
|
|
816
|
-
default: w(() => [s(S(
|
|
816
|
+
default: w(() => [s(S(j))]),
|
|
817
817
|
_: 1
|
|
818
818
|
})]),
|
|
819
819
|
_: 1
|
|
@@ -821,13 +821,13 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
821
821
|
_: 1
|
|
822
822
|
})
|
|
823
823
|
]),
|
|
824
|
-
a("div",
|
|
825
|
-
t.onlineUsers.length > 0 ? (h(), i("div",
|
|
824
|
+
a("div", jn, [
|
|
825
|
+
t.onlineUsers.length > 0 ? (h(), i("div", Mn, [(h(!0), i(e, null, v(t.onlineUsers.slice(0, 5), (e) => (h(), i("div", {
|
|
826
826
|
key: e.clientId,
|
|
827
827
|
class: "collab-avatar",
|
|
828
828
|
style: f({ background: e.color }),
|
|
829
829
|
title: e.name
|
|
830
|
-
}, x(e.name?.charAt(0)), 13,
|
|
830
|
+
}, x(e.name?.charAt(0)), 13, Nn))), 128))])) : r("", !0),
|
|
831
831
|
t.isJoinMode ? r("", !0) : (h(), n(p, {
|
|
832
832
|
key: 1,
|
|
833
833
|
size: "small",
|
|
@@ -835,7 +835,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
835
835
|
onClick: u[7] ||= (e) => c.$emit("toggle-collab")
|
|
836
836
|
}, {
|
|
837
837
|
default: w(() => [s(d, null, {
|
|
838
|
-
default: w(() => [s(S(
|
|
838
|
+
default: w(() => [s(S(fe))]),
|
|
839
839
|
_: 1
|
|
840
840
|
}), a("span", null, x(t.isConnected ? "协作中" : "协作"), 1)]),
|
|
841
841
|
_: 1
|
|
@@ -848,7 +848,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
848
848
|
title: "分享链接"
|
|
849
849
|
}, {
|
|
850
850
|
default: w(() => [s(d, null, {
|
|
851
|
-
default: w(() => [s(S(
|
|
851
|
+
default: w(() => [s(S(oe))]),
|
|
852
852
|
_: 1
|
|
853
853
|
})]),
|
|
854
854
|
_: 1
|
|
@@ -860,7 +860,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
860
860
|
title: "导入JSON"
|
|
861
861
|
}, {
|
|
862
862
|
default: w(() => [s(d, null, {
|
|
863
|
-
default: w(() => [s(S(
|
|
863
|
+
default: w(() => [s(S(me))]),
|
|
864
864
|
_: 1
|
|
865
865
|
}), u[17] ||= o(" 导入 ", -1)]),
|
|
866
866
|
_: 1
|
|
@@ -888,7 +888,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
888
888
|
})]),
|
|
889
889
|
default: w(() => [s(p, { size: "small" }, {
|
|
890
890
|
default: w(() => [u[18] ||= o("导出", -1), s(d, { class: "el-icon--right" }, {
|
|
891
|
-
default: w(() => [s(S(
|
|
891
|
+
default: w(() => [s(S(M))]),
|
|
892
892
|
_: 1
|
|
893
893
|
})]),
|
|
894
894
|
_: 1
|
|
@@ -900,7 +900,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
900
900
|
onClick: u[11] ||= (e) => c.$emit("save")
|
|
901
901
|
}, {
|
|
902
902
|
default: w(() => [s(d, null, {
|
|
903
|
-
default: w(() => [s(S(
|
|
903
|
+
default: w(() => [s(S(I))]),
|
|
904
904
|
_: 1
|
|
905
905
|
})]),
|
|
906
906
|
_: 1
|
|
@@ -913,7 +913,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
913
913
|
onClick: u[12] ||= (e) => c.$emit("history")
|
|
914
914
|
}, {
|
|
915
915
|
default: w(() => [s(d, null, {
|
|
916
|
-
default: w(() => [s(S(
|
|
916
|
+
default: w(() => [s(S(ne))]),
|
|
917
917
|
_: 1
|
|
918
918
|
})]),
|
|
919
919
|
_: 1
|
|
@@ -922,7 +922,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
922
922
|
]);
|
|
923
923
|
};
|
|
924
924
|
}
|
|
925
|
-
}, [["__scopeId", "data-v-3ac7baaa"]]),
|
|
925
|
+
}, [["__scopeId", "data-v-3ac7baaa"]]), Fn = { type: "change" }, In = { type: "start" }, Ln = { type: "end" }, Rn = new vt(), zn = new dt(), Bn = Math.cos(70 * Xe.DEG2RAD), q = new K(), Vn = 2 * Math.PI, J = {
|
|
926
926
|
NONE: -1,
|
|
927
927
|
ROTATE: 0,
|
|
928
928
|
DOLLY: 1,
|
|
@@ -931,21 +931,21 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
931
931
|
TOUCH_PAN: 4,
|
|
932
932
|
TOUCH_DOLLY_PAN: 5,
|
|
933
933
|
TOUCH_DOLLY_ROTATE: 6
|
|
934
|
-
},
|
|
934
|
+
}, Hn = 1e-6, Un = class extends Ce {
|
|
935
935
|
constructor(e, t = null) {
|
|
936
|
-
super(e, t), this.state =
|
|
936
|
+
super(e, t), this.state = J.NONE, this.target = new K(), this.cursor = new K(), this.minDistance = 0, this.maxDistance = Infinity, this.minZoom = 0, this.maxZoom = Infinity, this.minTargetRadius = 0, this.maxTargetRadius = Infinity, this.minPolarAngle = 0, this.maxPolarAngle = Math.PI, this.minAzimuthAngle = -Infinity, this.maxAzimuthAngle = Infinity, this.enableDamping = !1, this.dampingFactor = .05, this.enableZoom = !0, this.zoomSpeed = 1, this.enableRotate = !0, this.rotateSpeed = 1, this.keyRotateSpeed = 1, this.enablePan = !0, this.panSpeed = 1, this.screenSpacePanning = !0, this.keyPanSpeed = 7, this.zoomToCursor = !1, this.autoRotate = !1, this.autoRotateSpeed = 2, this.keys = {
|
|
937
937
|
LEFT: "ArrowLeft",
|
|
938
938
|
UP: "ArrowUp",
|
|
939
939
|
RIGHT: "ArrowRight",
|
|
940
940
|
BOTTOM: "ArrowDown"
|
|
941
941
|
}, this.mouseButtons = {
|
|
942
|
-
LEFT:
|
|
943
|
-
MIDDLE:
|
|
944
|
-
RIGHT:
|
|
942
|
+
LEFT: Je.ROTATE,
|
|
943
|
+
MIDDLE: Je.DOLLY,
|
|
944
|
+
RIGHT: Je.PAN
|
|
945
945
|
}, this.touches = {
|
|
946
|
-
ONE:
|
|
947
|
-
TWO:
|
|
948
|
-
}, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new
|
|
946
|
+
ONE: Ot.ROTATE,
|
|
947
|
+
TWO: Ot.DOLLY_PAN
|
|
948
|
+
}, this.target0 = this.target.clone(), this.position0 = this.object.position.clone(), this.zoom0 = this.object.zoom, this._cursorStyle = "auto", this._domElementKeyEvents = null, this._lastPosition = new K(), this._lastQuaternion = new W(), this._lastTargetPosition = new K(), this._quat = new W().setFromUnitVectors(e.up, new K(0, 1, 0)), this._quatInverse = this._quat.clone().invert(), this._spherical = new Et(), this._sphericalDelta = new Et(), this._scale = 1, this._panOffset = new K(), this._rotateStart = new G(), this._rotateEnd = new G(), this._rotateDelta = new G(), this._panStart = new G(), this._panEnd = new G(), this._panDelta = new G(), this._dollyStart = new G(), this._dollyEnd = new G(), this._dollyDelta = new G(), this._dollyDirection = new K(), this._mouse = new G(), this._performCursorZoom = !1, this._pointers = [], this._pointerPositions = {}, this._controlActive = !1, this._onPointerMove = Gn.bind(this), this._onPointerDown = Wn.bind(this), this._onPointerUp = Kn.bind(this), this._onContextMenu = $n.bind(this), this._onMouseWheel = Yn.bind(this), this._onKeyDown = Xn.bind(this), this._onTouchStart = Zn.bind(this), this._onTouchMove = Qn.bind(this), this._onMouseDown = qn.bind(this), this._onMouseMove = Jn.bind(this), this._interceptControlDown = er.bind(this), this._interceptControlUp = tr.bind(this), this.domElement !== null && this.connect(this.domElement), this.update();
|
|
949
949
|
}
|
|
950
950
|
set cursorStyle(e) {
|
|
951
951
|
this._cursorStyle = e, e === "grab" ? this.domElement.style.cursor = "grab" : this.domElement.style.cursor = "auto";
|
|
@@ -984,7 +984,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
984
984
|
this.target0.copy(this.target), this.position0.copy(this.object.position), this.zoom0 = this.object.zoom;
|
|
985
985
|
}
|
|
986
986
|
reset() {
|
|
987
|
-
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(
|
|
987
|
+
this.target.copy(this.target0), this.object.position.copy(this.position0), this.object.zoom = this.zoom0, this.object.updateProjectionMatrix(), this.dispatchEvent(Fn), this.update(), this.state = J.NONE;
|
|
988
988
|
}
|
|
989
989
|
pan(e, t) {
|
|
990
990
|
this._pan(e, t), this.update();
|
|
@@ -1003,39 +1003,39 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1003
1003
|
}
|
|
1004
1004
|
update(e = null) {
|
|
1005
1005
|
let t = this.object.position;
|
|
1006
|
-
|
|
1006
|
+
q.copy(t).sub(this.target), q.applyQuaternion(this._quat), this._spherical.setFromVector3(q), this.autoRotate && this.state === J.NONE && this._rotateLeft(this._getAutoRotationAngle(e)), this.enableDamping ? (this._spherical.theta += this._sphericalDelta.theta * this.dampingFactor, this._spherical.phi += this._sphericalDelta.phi * this.dampingFactor) : (this._spherical.theta += this._sphericalDelta.theta, this._spherical.phi += this._sphericalDelta.phi);
|
|
1007
1007
|
let n = this.minAzimuthAngle, r = this.maxAzimuthAngle;
|
|
1008
|
-
isFinite(n) && isFinite(r) && (n < -Math.PI ? n +=
|
|
1008
|
+
isFinite(n) && isFinite(r) && (n < -Math.PI ? n += Vn : n > Math.PI && (n -= Vn), r < -Math.PI ? r += Vn : r > Math.PI && (r -= Vn), n <= r ? this._spherical.theta = Math.max(n, Math.min(r, this._spherical.theta)) : this._spherical.theta = this._spherical.theta > (n + r) / 2 ? Math.max(n, this._spherical.theta) : Math.min(r, this._spherical.theta)), this._spherical.phi = Math.max(this.minPolarAngle, Math.min(this.maxPolarAngle, this._spherical.phi)), this._spherical.makeSafe(), this.enableDamping === !0 ? this.target.addScaledVector(this._panOffset, this.dampingFactor) : this.target.add(this._panOffset), this.target.sub(this.cursor), this.target.clampLength(this.minTargetRadius, this.maxTargetRadius), this.target.add(this.cursor);
|
|
1009
1009
|
let i = !1;
|
|
1010
1010
|
if (this.zoomToCursor && this._performCursorZoom || this.object.isOrthographicCamera) this._spherical.radius = this._clampDistance(this._spherical.radius);
|
|
1011
1011
|
else {
|
|
1012
1012
|
let e = this._spherical.radius;
|
|
1013
1013
|
this._spherical.radius = this._clampDistance(this._spherical.radius * this._scale), i = e != this._spherical.radius;
|
|
1014
1014
|
}
|
|
1015
|
-
if (
|
|
1015
|
+
if (q.setFromSpherical(this._spherical), q.applyQuaternion(this._quatInverse), t.copy(this.target).add(q), this.object.lookAt(this.target), this.enableDamping === !0 ? (this._sphericalDelta.theta *= 1 - this.dampingFactor, this._sphericalDelta.phi *= 1 - this.dampingFactor, this._panOffset.multiplyScalar(1 - this.dampingFactor)) : (this._sphericalDelta.set(0, 0, 0), this._panOffset.set(0, 0, 0)), this.zoomToCursor && this._performCursorZoom) {
|
|
1016
1016
|
let e = null;
|
|
1017
1017
|
if (this.object.isPerspectiveCamera) {
|
|
1018
|
-
let t =
|
|
1018
|
+
let t = q.length();
|
|
1019
1019
|
e = this._clampDistance(t * this._scale);
|
|
1020
1020
|
let n = t - e;
|
|
1021
1021
|
this.object.position.addScaledVector(this._dollyDirection, n), this.object.updateMatrixWorld(), i = !!n;
|
|
1022
1022
|
} else if (this.object.isOrthographicCamera) {
|
|
1023
|
-
let t = new
|
|
1023
|
+
let t = new K(this._mouse.x, this._mouse.y, 0);
|
|
1024
1024
|
t.unproject(this.object);
|
|
1025
1025
|
let n = this.object.zoom;
|
|
1026
1026
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), this.object.updateProjectionMatrix(), i = n !== this.object.zoom;
|
|
1027
|
-
let r = new
|
|
1028
|
-
r.unproject(this.object), this.object.position.sub(r).add(t), this.object.updateMatrixWorld(), e =
|
|
1027
|
+
let r = new K(this._mouse.x, this._mouse.y, 0);
|
|
1028
|
+
r.unproject(this.object), this.object.position.sub(r).add(t), this.object.updateMatrixWorld(), e = q.length();
|
|
1029
1029
|
} else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."), this.zoomToCursor = !1;
|
|
1030
|
-
e !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(e).add(this.object.position) : (
|
|
1030
|
+
e !== null && (this.screenSpacePanning ? this.target.set(0, 0, -1).transformDirection(this.object.matrix).multiplyScalar(e).add(this.object.position) : (Rn.origin.copy(this.object.position), Rn.direction.set(0, 0, -1).transformDirection(this.object.matrix), Math.abs(this.object.up.dot(Rn.direction)) < Bn ? this.object.lookAt(this.target) : (zn.setFromNormalAndCoplanarPoint(this.object.up, this.target), Rn.intersectPlane(zn, this.target))));
|
|
1031
1031
|
} else if (this.object.isOrthographicCamera) {
|
|
1032
1032
|
let e = this.object.zoom;
|
|
1033
1033
|
this.object.zoom = Math.max(this.minZoom, Math.min(this.maxZoom, this.object.zoom / this._scale)), e !== this.object.zoom && (this.object.updateProjectionMatrix(), i = !0);
|
|
1034
1034
|
}
|
|
1035
|
-
return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) >
|
|
1035
|
+
return this._scale = 1, this._performCursorZoom = !1, i || this._lastPosition.distanceToSquared(this.object.position) > Hn || 8 * (1 - this._lastQuaternion.dot(this.object.quaternion)) > Hn || this._lastTargetPosition.distanceToSquared(this.target) > Hn ? (this.dispatchEvent(Fn), this._lastPosition.copy(this.object.position), this._lastQuaternion.copy(this.object.quaternion), this._lastTargetPosition.copy(this.target), !0) : !1;
|
|
1036
1036
|
}
|
|
1037
1037
|
_getAutoRotationAngle(e) {
|
|
1038
|
-
return e === null ?
|
|
1038
|
+
return e === null ? Vn / 60 / 60 * this.autoRotateSpeed : Vn / 60 * this.autoRotateSpeed * e;
|
|
1039
1039
|
}
|
|
1040
1040
|
_getZoomScale(e) {
|
|
1041
1041
|
let t = Math.abs(e * .01);
|
|
@@ -1048,17 +1048,17 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1048
1048
|
this._sphericalDelta.phi -= e;
|
|
1049
1049
|
}
|
|
1050
1050
|
_panLeft(e, t) {
|
|
1051
|
-
|
|
1051
|
+
q.setFromMatrixColumn(t, 0), q.multiplyScalar(-e), this._panOffset.add(q);
|
|
1052
1052
|
}
|
|
1053
1053
|
_panUp(e, t) {
|
|
1054
|
-
this.screenSpacePanning === !0 ?
|
|
1054
|
+
this.screenSpacePanning === !0 ? q.setFromMatrixColumn(t, 1) : (q.setFromMatrixColumn(t, 0), q.crossVectors(this.object.up, q)), q.multiplyScalar(e), this._panOffset.add(q);
|
|
1055
1055
|
}
|
|
1056
1056
|
_pan(e, t) {
|
|
1057
1057
|
let n = this.domElement;
|
|
1058
1058
|
if (this.object.isPerspectiveCamera) {
|
|
1059
1059
|
let r = this.object.position;
|
|
1060
|
-
|
|
1061
|
-
let i =
|
|
1060
|
+
q.copy(r).sub(this.target);
|
|
1061
|
+
let i = q.length();
|
|
1062
1062
|
i *= Math.tan(this.object.fov / 2 * Math.PI / 180), this._panLeft(2 * e * i / n.clientHeight, this.object.matrix), this._panUp(2 * t * i / n.clientHeight, this.object.matrix);
|
|
1063
1063
|
} else this.object.isOrthographicCamera ? (this._panLeft(e * (this.object.right - this.object.left) / this.object.zoom / n.clientWidth, this.object.matrix), this._panUp(t * (this.object.top - this.object.bottom) / this.object.zoom / n.clientHeight, this.object.matrix)) : (console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."), this.enablePan = !1);
|
|
1064
1064
|
}
|
|
@@ -1089,7 +1089,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1089
1089
|
_handleMouseMoveRotate(e) {
|
|
1090
1090
|
this._rotateEnd.set(e.clientX, e.clientY), this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
1091
1091
|
let t = this.domElement;
|
|
1092
|
-
this._rotateLeft(
|
|
1092
|
+
this._rotateLeft(Vn * this._rotateDelta.x / t.clientHeight), this._rotateUp(Vn * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd), this.update();
|
|
1093
1093
|
}
|
|
1094
1094
|
_handleMouseMoveDolly(e) {
|
|
1095
1095
|
this._dollyEnd.set(e.clientX, e.clientY), this._dollyDelta.subVectors(this._dollyEnd, this._dollyStart), this._dollyDelta.y > 0 ? this._dollyOut(this._getZoomScale(this._dollyDelta.y)) : this._dollyDelta.y < 0 && this._dollyIn(this._getZoomScale(this._dollyDelta.y)), this._dollyStart.copy(this._dollyEnd), this.update();
|
|
@@ -1104,16 +1104,16 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1104
1104
|
let t = !1;
|
|
1105
1105
|
switch (e.code) {
|
|
1106
1106
|
case this.keys.UP:
|
|
1107
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(
|
|
1107
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(Vn * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, this.keyPanSpeed), t = !0;
|
|
1108
1108
|
break;
|
|
1109
1109
|
case this.keys.BOTTOM:
|
|
1110
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-
|
|
1110
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateUp(-Vn * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(0, -this.keyPanSpeed), t = !0;
|
|
1111
1111
|
break;
|
|
1112
1112
|
case this.keys.LEFT:
|
|
1113
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(
|
|
1113
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(Vn * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(this.keyPanSpeed, 0), t = !0;
|
|
1114
1114
|
break;
|
|
1115
1115
|
case this.keys.RIGHT:
|
|
1116
|
-
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-
|
|
1116
|
+
e.ctrlKey || e.metaKey || e.shiftKey ? this.enableRotate && this._rotateLeft(-Vn * this.keyRotateSpeed / this.domElement.clientHeight) : this.enablePan && this._pan(-this.keyPanSpeed, 0), t = !0;
|
|
1117
1117
|
break;
|
|
1118
1118
|
}
|
|
1119
1119
|
t && (e.preventDefault(), this.update());
|
|
@@ -1150,7 +1150,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1150
1150
|
}
|
|
1151
1151
|
this._rotateDelta.subVectors(this._rotateEnd, this._rotateStart).multiplyScalar(this.rotateSpeed);
|
|
1152
1152
|
let t = this.domElement;
|
|
1153
|
-
this._rotateLeft(
|
|
1153
|
+
this._rotateLeft(Vn * this._rotateDelta.x / t.clientHeight), this._rotateUp(Vn * this._rotateDelta.y / t.clientHeight), this._rotateStart.copy(this._rotateEnd);
|
|
1154
1154
|
}
|
|
1155
1155
|
_handleTouchMovePan(e) {
|
|
1156
1156
|
if (this._pointers.length === 1) this._panEnd.set(e.pageX, e.pageY);
|
|
@@ -1188,7 +1188,7 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1188
1188
|
}
|
|
1189
1189
|
_trackPointer(e) {
|
|
1190
1190
|
let t = this._pointerPositions[e.pointerId];
|
|
1191
|
-
t === void 0 && (t = new
|
|
1191
|
+
t === void 0 && (t = new G(), this._pointerPositions[e.pointerId] = t), t.set(e.pageX, e.pageY);
|
|
1192
1192
|
}
|
|
1193
1193
|
_getSecondPointerPosition(e) {
|
|
1194
1194
|
let t = e.pointerId === this._pointers[0] ? this._pointers[1] : this._pointers[0];
|
|
@@ -1211,16 +1211,16 @@ var hn = "/api/document-versions", gn = 5e3, _n = () => {
|
|
|
1211
1211
|
return e.ctrlKey && !this._controlActive && (n.deltaY *= 10), n;
|
|
1212
1212
|
}
|
|
1213
1213
|
};
|
|
1214
|
-
function
|
|
1214
|
+
function Wn(e) {
|
|
1215
1215
|
this.enabled !== !1 && (this._pointers.length === 0 && (this.domElement.setPointerCapture(e.pointerId), this.domElement.ownerDocument.addEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.addEventListener("pointerup", this._onPointerUp)), !this._isTrackingPointer(e) && (this._addPointer(e), e.pointerType === "touch" ? this._onTouchStart(e) : this._onMouseDown(e), this._cursorStyle === "grab" && (this.domElement.style.cursor = "grabbing")));
|
|
1216
1216
|
}
|
|
1217
|
-
function
|
|
1217
|
+
function Gn(e) {
|
|
1218
1218
|
this.enabled !== !1 && (e.pointerType === "touch" ? this._onTouchMove(e) : this._onMouseMove(e));
|
|
1219
1219
|
}
|
|
1220
|
-
function
|
|
1220
|
+
function Kn(e) {
|
|
1221
1221
|
switch (this._removePointer(e), this._pointers.length) {
|
|
1222
1222
|
case 0:
|
|
1223
|
-
this.domElement.releasePointerCapture(e.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(
|
|
1223
|
+
this.domElement.releasePointerCapture(e.pointerId), this.domElement.ownerDocument.removeEventListener("pointermove", this._onPointerMove), this.domElement.ownerDocument.removeEventListener("pointerup", this._onPointerUp), this.dispatchEvent(Ln), this.state = J.NONE, this._cursorStyle === "grab" && (this.domElement.style.cursor = "grab");
|
|
1224
1224
|
break;
|
|
1225
1225
|
case 1:
|
|
1226
1226
|
let t = this._pointers[0], n = this._pointerPositions[t];
|
|
@@ -1232,7 +1232,7 @@ function qn(e) {
|
|
|
1232
1232
|
break;
|
|
1233
1233
|
}
|
|
1234
1234
|
}
|
|
1235
|
-
function
|
|
1235
|
+
function qn(e) {
|
|
1236
1236
|
let t;
|
|
1237
1237
|
switch (e.button) {
|
|
1238
1238
|
case 0:
|
|
@@ -1247,117 +1247,117 @@ function Jn(e) {
|
|
|
1247
1247
|
default: t = -1;
|
|
1248
1248
|
}
|
|
1249
1249
|
switch (t) {
|
|
1250
|
-
case
|
|
1250
|
+
case Je.DOLLY:
|
|
1251
1251
|
if (this.enableZoom === !1) return;
|
|
1252
|
-
this._handleMouseDownDolly(e), this.state =
|
|
1252
|
+
this._handleMouseDownDolly(e), this.state = J.DOLLY;
|
|
1253
1253
|
break;
|
|
1254
|
-
case
|
|
1254
|
+
case Je.ROTATE:
|
|
1255
1255
|
if (e.ctrlKey || e.metaKey || e.shiftKey) {
|
|
1256
1256
|
if (this.enablePan === !1) return;
|
|
1257
|
-
this._handleMouseDownPan(e), this.state =
|
|
1257
|
+
this._handleMouseDownPan(e), this.state = J.PAN;
|
|
1258
1258
|
} else {
|
|
1259
1259
|
if (this.enableRotate === !1) return;
|
|
1260
|
-
this._handleMouseDownRotate(e), this.state =
|
|
1260
|
+
this._handleMouseDownRotate(e), this.state = J.ROTATE;
|
|
1261
1261
|
}
|
|
1262
1262
|
break;
|
|
1263
|
-
case
|
|
1263
|
+
case Je.PAN:
|
|
1264
1264
|
if (e.ctrlKey || e.metaKey || e.shiftKey) {
|
|
1265
1265
|
if (this.enableRotate === !1) return;
|
|
1266
|
-
this._handleMouseDownRotate(e), this.state =
|
|
1266
|
+
this._handleMouseDownRotate(e), this.state = J.ROTATE;
|
|
1267
1267
|
} else {
|
|
1268
1268
|
if (this.enablePan === !1) return;
|
|
1269
|
-
this._handleMouseDownPan(e), this.state =
|
|
1269
|
+
this._handleMouseDownPan(e), this.state = J.PAN;
|
|
1270
1270
|
}
|
|
1271
1271
|
break;
|
|
1272
|
-
default: this.state =
|
|
1272
|
+
default: this.state = J.NONE;
|
|
1273
1273
|
}
|
|
1274
|
-
this.state !==
|
|
1274
|
+
this.state !== J.NONE && this.dispatchEvent(In);
|
|
1275
1275
|
}
|
|
1276
|
-
function
|
|
1276
|
+
function Jn(e) {
|
|
1277
1277
|
switch (this.state) {
|
|
1278
|
-
case
|
|
1278
|
+
case J.ROTATE:
|
|
1279
1279
|
if (this.enableRotate === !1) return;
|
|
1280
1280
|
this._handleMouseMoveRotate(e);
|
|
1281
1281
|
break;
|
|
1282
|
-
case
|
|
1282
|
+
case J.DOLLY:
|
|
1283
1283
|
if (this.enableZoom === !1) return;
|
|
1284
1284
|
this._handleMouseMoveDolly(e);
|
|
1285
1285
|
break;
|
|
1286
|
-
case
|
|
1286
|
+
case J.PAN:
|
|
1287
1287
|
if (this.enablePan === !1) return;
|
|
1288
1288
|
this._handleMouseMovePan(e);
|
|
1289
1289
|
break;
|
|
1290
1290
|
}
|
|
1291
1291
|
}
|
|
1292
|
-
function
|
|
1293
|
-
this.enabled === !1 || this.enableZoom === !1 || this.state !==
|
|
1292
|
+
function Yn(e) {
|
|
1293
|
+
this.enabled === !1 || this.enableZoom === !1 || this.state !== J.NONE || (e.preventDefault(), this.dispatchEvent(In), this._handleMouseWheel(this._customWheelEvent(e)), this.dispatchEvent(Ln));
|
|
1294
1294
|
}
|
|
1295
|
-
function
|
|
1295
|
+
function Xn(e) {
|
|
1296
1296
|
this.enabled !== !1 && this._handleKeyDown(e);
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function Zn(e) {
|
|
1299
1299
|
switch (this._trackPointer(e), this._pointers.length) {
|
|
1300
1300
|
case 1:
|
|
1301
1301
|
switch (this.touches.ONE) {
|
|
1302
|
-
case
|
|
1302
|
+
case Ot.ROTATE:
|
|
1303
1303
|
if (this.enableRotate === !1) return;
|
|
1304
|
-
this._handleTouchStartRotate(e), this.state =
|
|
1304
|
+
this._handleTouchStartRotate(e), this.state = J.TOUCH_ROTATE;
|
|
1305
1305
|
break;
|
|
1306
|
-
case
|
|
1306
|
+
case Ot.PAN:
|
|
1307
1307
|
if (this.enablePan === !1) return;
|
|
1308
|
-
this._handleTouchStartPan(e), this.state =
|
|
1308
|
+
this._handleTouchStartPan(e), this.state = J.TOUCH_PAN;
|
|
1309
1309
|
break;
|
|
1310
|
-
default: this.state =
|
|
1310
|
+
default: this.state = J.NONE;
|
|
1311
1311
|
}
|
|
1312
1312
|
break;
|
|
1313
1313
|
case 2:
|
|
1314
1314
|
switch (this.touches.TWO) {
|
|
1315
|
-
case
|
|
1315
|
+
case Ot.DOLLY_PAN:
|
|
1316
1316
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
1317
|
-
this._handleTouchStartDollyPan(e), this.state =
|
|
1317
|
+
this._handleTouchStartDollyPan(e), this.state = J.TOUCH_DOLLY_PAN;
|
|
1318
1318
|
break;
|
|
1319
|
-
case
|
|
1319
|
+
case Ot.DOLLY_ROTATE:
|
|
1320
1320
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
1321
|
-
this._handleTouchStartDollyRotate(e), this.state =
|
|
1321
|
+
this._handleTouchStartDollyRotate(e), this.state = J.TOUCH_DOLLY_ROTATE;
|
|
1322
1322
|
break;
|
|
1323
|
-
default: this.state =
|
|
1323
|
+
default: this.state = J.NONE;
|
|
1324
1324
|
}
|
|
1325
1325
|
break;
|
|
1326
|
-
default: this.state =
|
|
1326
|
+
default: this.state = J.NONE;
|
|
1327
1327
|
}
|
|
1328
|
-
this.state !==
|
|
1328
|
+
this.state !== J.NONE && this.dispatchEvent(In);
|
|
1329
1329
|
}
|
|
1330
|
-
function
|
|
1330
|
+
function Qn(e) {
|
|
1331
1331
|
switch (this._trackPointer(e), this.state) {
|
|
1332
|
-
case
|
|
1332
|
+
case J.TOUCH_ROTATE:
|
|
1333
1333
|
if (this.enableRotate === !1) return;
|
|
1334
1334
|
this._handleTouchMoveRotate(e), this.update();
|
|
1335
1335
|
break;
|
|
1336
|
-
case
|
|
1336
|
+
case J.TOUCH_PAN:
|
|
1337
1337
|
if (this.enablePan === !1) return;
|
|
1338
1338
|
this._handleTouchMovePan(e), this.update();
|
|
1339
1339
|
break;
|
|
1340
|
-
case
|
|
1340
|
+
case J.TOUCH_DOLLY_PAN:
|
|
1341
1341
|
if (this.enableZoom === !1 && this.enablePan === !1) return;
|
|
1342
1342
|
this._handleTouchMoveDollyPan(e), this.update();
|
|
1343
1343
|
break;
|
|
1344
|
-
case
|
|
1344
|
+
case J.TOUCH_DOLLY_ROTATE:
|
|
1345
1345
|
if (this.enableZoom === !1 && this.enableRotate === !1) return;
|
|
1346
1346
|
this._handleTouchMoveDollyRotate(e), this.update();
|
|
1347
1347
|
break;
|
|
1348
|
-
default: this.state =
|
|
1348
|
+
default: this.state = J.NONE;
|
|
1349
1349
|
}
|
|
1350
1350
|
}
|
|
1351
|
-
function
|
|
1351
|
+
function $n(e) {
|
|
1352
1352
|
this.enabled !== !1 && e.preventDefault();
|
|
1353
1353
|
}
|
|
1354
|
-
function
|
|
1354
|
+
function er(e) {
|
|
1355
1355
|
e.key === "Control" && (this._controlActive = !0, this.domElement.getRootNode().addEventListener("keyup", this._interceptControlUp, {
|
|
1356
1356
|
passive: !0,
|
|
1357
1357
|
capture: !0
|
|
1358
1358
|
}));
|
|
1359
1359
|
}
|
|
1360
|
-
function
|
|
1360
|
+
function tr(e) {
|
|
1361
1361
|
e.key === "Control" && (this._controlActive = !1, this.domElement.getRootNode().removeEventListener("keyup", this._interceptControlUp, {
|
|
1362
1362
|
passive: !0,
|
|
1363
1363
|
capture: !0
|
|
@@ -1365,24 +1365,24 @@ function nr(e) {
|
|
|
1365
1365
|
}
|
|
1366
1366
|
//#endregion
|
|
1367
1367
|
//#region ../../node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/controls/TransformControls.js
|
|
1368
|
-
var
|
|
1369
|
-
X: new
|
|
1370
|
-
Y: new
|
|
1371
|
-
Z: new
|
|
1372
|
-
},
|
|
1368
|
+
var nr = new yt(), Y = new K(), rr = new K(), X = new W(), ir = {
|
|
1369
|
+
X: new K(1, 0, 0),
|
|
1370
|
+
Y: new K(0, 1, 0),
|
|
1371
|
+
Z: new K(0, 0, 1)
|
|
1372
|
+
}, ar = { type: "change" }, or = {
|
|
1373
1373
|
type: "mouseDown",
|
|
1374
1374
|
mode: null
|
|
1375
|
-
},
|
|
1375
|
+
}, sr = {
|
|
1376
1376
|
type: "mouseUp",
|
|
1377
1377
|
mode: null
|
|
1378
|
-
},
|
|
1378
|
+
}, cr = { type: "objectChange" }, lr = class extends Ce {
|
|
1379
1379
|
constructor(e, t = null) {
|
|
1380
1380
|
super(void 0, t);
|
|
1381
|
-
let n = new
|
|
1381
|
+
let n = new kr(this);
|
|
1382
1382
|
this._root = n;
|
|
1383
|
-
let r = new
|
|
1383
|
+
let r = new Ar();
|
|
1384
1384
|
this._gizmo = r, n.add(r);
|
|
1385
|
-
let i = new
|
|
1385
|
+
let i = new jr();
|
|
1386
1386
|
this._plane = i, n.add(i);
|
|
1387
1387
|
let a = this;
|
|
1388
1388
|
function o(e, t) {
|
|
@@ -1395,13 +1395,13 @@ var rr = new xt(), J = new W(), ir = new W(), Y = new H(), ar = {
|
|
|
1395
1395
|
n !== t && (n = t, i[e] = t, r[e] = t, a.dispatchEvent({
|
|
1396
1396
|
type: e + "-changed",
|
|
1397
1397
|
value: t
|
|
1398
|
-
}), a.dispatchEvent(
|
|
1398
|
+
}), a.dispatchEvent(ar));
|
|
1399
1399
|
}
|
|
1400
1400
|
}), a[e] = t, i[e] = t, r[e] = t;
|
|
1401
1401
|
}
|
|
1402
1402
|
o("camera", e), o("object", void 0), o("enabled", !0), o("axis", null), o("mode", "translate"), o("translationSnap", null), o("rotationSnap", null), o("scaleSnap", null), o("space", "world"), o("size", 1), o("dragging", !1), o("showX", !0), o("showY", !0), o("showZ", !0), o("showXY", !0), o("showYZ", !0), o("showXZ", !0), o("minX", -Infinity), o("maxX", Infinity), o("minY", -Infinity), o("maxY", Infinity), o("minZ", -Infinity), o("maxZ", Infinity);
|
|
1403
|
-
let s = new
|
|
1404
|
-
o("worldPosition", s), o("worldPositionStart", c), o("worldQuaternion", l), o("worldQuaternionStart", u), o("cameraPosition", d), o("cameraQuaternion", f), o("pointStart", p), o("pointEnd", m), o("rotationAxis", h), o("rotationAngle", 0), o("eye", g), this._offset = new
|
|
1403
|
+
let s = new K(), c = new K(), l = new W(), u = new W(), d = new K(), f = new W(), p = new K(), m = new K(), h = new K(), g = new K();
|
|
1404
|
+
o("worldPosition", s), o("worldPositionStart", c), o("worldQuaternion", l), o("worldQuaternionStart", u), o("cameraPosition", d), o("cameraQuaternion", f), o("pointStart", p), o("pointEnd", m), o("rotationAxis", h), o("rotationAngle", 0), o("eye", g), this._offset = new K(), this._startNorm = new K(), this._endNorm = new K(), this._cameraScale = new K(), this._parentPosition = new K(), this._parentQuaternion = new W(), this._parentQuaternionInv = new W(), this._parentScale = new K(), this._worldScaleStart = new K(), this._worldQuaternionInv = new W(), this._worldScale = new K(), this._positionStart = new K(), this._quaternionStart = new W(), this._scaleStart = new K(), this._getPointer = ur.bind(this), this._onPointerDown = fr.bind(this), this._onPointerHover = dr.bind(this), this._onPointerMove = pr.bind(this), this._onPointerUp = mr.bind(this), t !== null && this.connect(t);
|
|
1405
1405
|
}
|
|
1406
1406
|
connect(e) {
|
|
1407
1407
|
super.connect(e), this.domElement.addEventListener("pointerdown", this._onPointerDown), this.domElement.addEventListener("pointermove", this._onPointerHover), this.domElement.addEventListener("pointerup", this._onPointerUp), this.domElement.style.touchAction = "none";
|
|
@@ -1414,40 +1414,40 @@ var rr = new xt(), J = new W(), ir = new W(), Y = new H(), ar = {
|
|
|
1414
1414
|
}
|
|
1415
1415
|
pointerHover(e) {
|
|
1416
1416
|
if (this.object === void 0 || this.dragging === !0) return;
|
|
1417
|
-
e !== null &&
|
|
1418
|
-
let t =
|
|
1417
|
+
e !== null && nr.setFromCamera(e, this.camera);
|
|
1418
|
+
let t = hr(this._gizmo.picker[this.mode], nr);
|
|
1419
1419
|
t ? this.axis = t.object.name : this.axis = null;
|
|
1420
1420
|
}
|
|
1421
1421
|
pointerDown(e) {
|
|
1422
1422
|
if (!(this.object === void 0 || this.dragging === !0 || e != null && e.button !== 0) && this.axis !== null) {
|
|
1423
|
-
e !== null &&
|
|
1424
|
-
let t =
|
|
1425
|
-
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0,
|
|
1423
|
+
e !== null && nr.setFromCamera(e, this.camera);
|
|
1424
|
+
let t = hr(this._plane, nr, !0);
|
|
1425
|
+
t && (this.object.updateMatrixWorld(), this.object.parent.updateMatrixWorld(), this._positionStart.copy(this.object.position), this._quaternionStart.copy(this.object.quaternion), this._scaleStart.copy(this.object.scale), this.object.matrixWorld.decompose(this.worldPositionStart, this.worldQuaternionStart, this._worldScaleStart), this.pointStart.copy(t.point).sub(this.worldPositionStart)), this.dragging = !0, or.mode = this.mode, this.dispatchEvent(or);
|
|
1426
1426
|
}
|
|
1427
1427
|
}
|
|
1428
1428
|
pointerMove(e) {
|
|
1429
1429
|
let t = this.axis, n = this.mode, r = this.object, i = this.space;
|
|
1430
1430
|
if (n === "scale" ? i = "local" : (t === "E" || t === "XYZE" || t === "XYZ") && (i = "world"), r === void 0 || t === null || this.dragging === !1 || e !== null && e.button !== -1) return;
|
|
1431
|
-
e !== null &&
|
|
1432
|
-
let a =
|
|
1431
|
+
e !== null && nr.setFromCamera(e, this.camera);
|
|
1432
|
+
let a = hr(this._plane, nr, !0);
|
|
1433
1433
|
if (a) {
|
|
1434
|
-
if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), n === "translate") this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), r.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (r.position.applyQuaternion(
|
|
1434
|
+
if (this.pointEnd.copy(a.point).sub(this.worldPositionStart), n === "translate") this._offset.copy(this.pointEnd).sub(this.pointStart), i === "local" && t !== "XYZ" && this._offset.applyQuaternion(this._worldQuaternionInv), t.indexOf("X") === -1 && (this._offset.x = 0), t.indexOf("Y") === -1 && (this._offset.y = 0), t.indexOf("Z") === -1 && (this._offset.z = 0), i === "local" && t !== "XYZ" ? this._offset.applyQuaternion(this._quaternionStart).divide(this._parentScale) : this._offset.applyQuaternion(this._parentQuaternionInv).divide(this._parentScale), r.position.copy(this._offset).add(this._positionStart), this.translationSnap && (i === "local" && (r.position.applyQuaternion(X.copy(this._quaternionStart).invert()), t.search("X") !== -1 && (r.position.x = Math.round(r.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (r.position.y = Math.round(r.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (r.position.z = Math.round(r.position.z / this.translationSnap) * this.translationSnap), r.position.applyQuaternion(this._quaternionStart)), i === "world" && (r.parent && r.position.add(Y.setFromMatrixPosition(r.parent.matrixWorld)), t.search("X") !== -1 && (r.position.x = Math.round(r.position.x / this.translationSnap) * this.translationSnap), t.search("Y") !== -1 && (r.position.y = Math.round(r.position.y / this.translationSnap) * this.translationSnap), t.search("Z") !== -1 && (r.position.z = Math.round(r.position.z / this.translationSnap) * this.translationSnap), r.parent && r.position.sub(Y.setFromMatrixPosition(r.parent.matrixWorld)))), r.position.x = Math.max(this.minX, Math.min(this.maxX, r.position.x)), r.position.y = Math.max(this.minY, Math.min(this.maxY, r.position.y)), r.position.z = Math.max(this.minZ, Math.min(this.maxZ, r.position.z));
|
|
1435
1435
|
else if (n === "scale") {
|
|
1436
1436
|
if (t.search("XYZ") !== -1) {
|
|
1437
1437
|
let e = this.pointEnd.length() / this.pointStart.length();
|
|
1438
|
-
this.pointEnd.dot(this.pointStart) < 0 && (e *= -1),
|
|
1439
|
-
} else
|
|
1440
|
-
r.scale.copy(this._scaleStart).multiply(
|
|
1438
|
+
this.pointEnd.dot(this.pointStart) < 0 && (e *= -1), rr.set(e, e, e);
|
|
1439
|
+
} else Y.copy(this.pointStart), rr.copy(this.pointEnd), Y.applyQuaternion(this._worldQuaternionInv), rr.applyQuaternion(this._worldQuaternionInv), rr.divide(Y), t.search("X") === -1 && (rr.x = 1), t.search("Y") === -1 && (rr.y = 1), t.search("Z") === -1 && (rr.z = 1);
|
|
1440
|
+
r.scale.copy(this._scaleStart).multiply(rr), this.scaleSnap && (t.search("X") !== -1 && (r.scale.x = Math.round(r.scale.x / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Y") !== -1 && (r.scale.y = Math.round(r.scale.y / this.scaleSnap) * this.scaleSnap || this.scaleSnap), t.search("Z") !== -1 && (r.scale.z = Math.round(r.scale.z / this.scaleSnap) * this.scaleSnap || this.scaleSnap));
|
|
1441
1441
|
} else if (n === "rotate") {
|
|
1442
1442
|
this._offset.copy(this.pointEnd).sub(this.pointStart);
|
|
1443
|
-
let e = 20 / this.worldPosition.distanceTo(
|
|
1444
|
-
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(
|
|
1443
|
+
let e = 20 / this.worldPosition.distanceTo(Y.setFromMatrixPosition(this.camera.matrixWorld)), n = !1;
|
|
1444
|
+
t === "XYZE" ? (this.rotationAxis.copy(this._offset).cross(this.eye).normalize(), this.rotationAngle = this._offset.dot(Y.copy(this.rotationAxis).cross(this.eye)) * e) : (t === "X" || t === "Y" || t === "Z") && (this.rotationAxis.copy(ir[t]), Y.copy(ir[t]), i === "local" && Y.applyQuaternion(this.worldQuaternion), Y.cross(this.eye), Y.length() === 0 ? n = !0 : this.rotationAngle = this._offset.dot(Y.normalize()) * e), (t === "E" || n) && (this.rotationAxis.copy(this.eye), this.rotationAngle = this.pointEnd.angleTo(this.pointStart), this._startNorm.copy(this.pointStart).normalize(), this._endNorm.copy(this.pointEnd).normalize(), this.rotationAngle *= this._endNorm.cross(this._startNorm).dot(this.eye) < 0 ? 1 : -1), this.rotationSnap && (this.rotationAngle = Math.round(this.rotationAngle / this.rotationSnap) * this.rotationSnap), i === "local" && t !== "E" && t !== "XYZE" ? (r.quaternion.copy(this._quaternionStart), r.quaternion.multiply(X.setFromAxisAngle(this.rotationAxis, this.rotationAngle)).normalize()) : (this.rotationAxis.applyQuaternion(this._parentQuaternionInv), r.quaternion.copy(X.setFromAxisAngle(this.rotationAxis, this.rotationAngle)), r.quaternion.multiply(this._quaternionStart).normalize());
|
|
1445
1445
|
}
|
|
1446
|
-
this.dispatchEvent(
|
|
1446
|
+
this.dispatchEvent(ar), this.dispatchEvent(cr);
|
|
1447
1447
|
}
|
|
1448
1448
|
}
|
|
1449
1449
|
pointerUp(e) {
|
|
1450
|
-
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (
|
|
1450
|
+
e !== null && e.button !== 0 || (this.dragging && this.axis !== null && (sr.mode = this.mode, this.dispatchEvent(sr)), this.dragging = !1, this.axis = null);
|
|
1451
1451
|
}
|
|
1452
1452
|
dispose() {
|
|
1453
1453
|
this.disconnect(), this._root.dispose();
|
|
@@ -1459,10 +1459,10 @@ var rr = new xt(), J = new W(), ir = new W(), Y = new H(), ar = {
|
|
|
1459
1459
|
return this.object = void 0, this.axis = null, this._root.visible = !1, this;
|
|
1460
1460
|
}
|
|
1461
1461
|
reset() {
|
|
1462
|
-
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(
|
|
1462
|
+
this.enabled && this.dragging && (this.object.position.copy(this._positionStart), this.object.quaternion.copy(this._quaternionStart), this.object.scale.copy(this._scaleStart), this.dispatchEvent(ar), this.dispatchEvent(cr), this.pointStart.copy(this.pointEnd));
|
|
1463
1463
|
}
|
|
1464
1464
|
getRaycaster() {
|
|
1465
|
-
return
|
|
1465
|
+
return nr;
|
|
1466
1466
|
}
|
|
1467
1467
|
getMode() {
|
|
1468
1468
|
return this.mode;
|
|
@@ -1490,7 +1490,7 @@ var rr = new xt(), J = new W(), ir = new W(), Y = new H(), ar = {
|
|
|
1490
1490
|
i.xAxis.color.set(e), i.yAxis.color.set(t), i.zAxis.color.set(n), i.active.color.set(r), i.xAxisTransparent.color.set(e), i.yAxisTransparent.color.set(t), i.zAxisTransparent.color.set(n), i.activeTransparent.color.set(r), i.xAxis._color && i.xAxis._color.set(e), i.yAxis._color && i.yAxis._color.set(t), i.zAxis._color && i.zAxis._color.set(n), i.active._color && i.active._color.set(r), i.xAxisTransparent._color && i.xAxisTransparent._color.set(e), i.yAxisTransparent._color && i.yAxisTransparent._color.set(t), i.zAxisTransparent._color && i.zAxisTransparent._color.set(n), i.activeTransparent._color && i.activeTransparent._color.set(r);
|
|
1491
1491
|
}
|
|
1492
1492
|
};
|
|
1493
|
-
function
|
|
1493
|
+
function ur(e) {
|
|
1494
1494
|
if (this.domElement.ownerDocument.pointerLockElement) return {
|
|
1495
1495
|
x: 0,
|
|
1496
1496
|
y: 0,
|
|
@@ -1505,7 +1505,7 @@ function dr(e) {
|
|
|
1505
1505
|
};
|
|
1506
1506
|
}
|
|
1507
1507
|
}
|
|
1508
|
-
function
|
|
1508
|
+
function dr(e) {
|
|
1509
1509
|
if (this.enabled) switch (e.pointerType) {
|
|
1510
1510
|
case "mouse":
|
|
1511
1511
|
case "pen":
|
|
@@ -1513,21 +1513,21 @@ function fr(e) {
|
|
|
1513
1513
|
break;
|
|
1514
1514
|
}
|
|
1515
1515
|
}
|
|
1516
|
-
function
|
|
1516
|
+
function fr(e) {
|
|
1517
1517
|
this.enabled && (document.pointerLockElement || this.domElement.setPointerCapture(e.pointerId), this.domElement.addEventListener("pointermove", this._onPointerMove), this.pointerHover(this._getPointer(e)), this.pointerDown(this._getPointer(e)));
|
|
1518
1518
|
}
|
|
1519
|
-
function
|
|
1519
|
+
function pr(e) {
|
|
1520
1520
|
this.enabled && this.pointerMove(this._getPointer(e));
|
|
1521
1521
|
}
|
|
1522
|
-
function
|
|
1522
|
+
function mr(e) {
|
|
1523
1523
|
this.enabled && (this.domElement.releasePointerCapture(e.pointerId), this.domElement.removeEventListener("pointermove", this._onPointerMove), this.pointerUp(this._getPointer(e)));
|
|
1524
1524
|
}
|
|
1525
|
-
function
|
|
1525
|
+
function hr(e, t, n) {
|
|
1526
1526
|
let r = t.intersectObject(e, !0);
|
|
1527
1527
|
for (let e = 0; e < r.length; e++) if (r[e].object.visible || n) return r[e];
|
|
1528
1528
|
return !1;
|
|
1529
1529
|
}
|
|
1530
|
-
var
|
|
1530
|
+
var gr = new Ee(), Z = new K(0, 1, 0), _r = new K(0, 0, 0), vr = new Ze(), yr = new W(), br = new W(), xr = new K(), Sr = new Ze(), Cr = new K(1, 0, 0), wr = new K(0, 1, 0), Tr = new K(0, 0, 1), Er = new K(), Dr = new K(), Or = new K(), kr = class extends st {
|
|
1531
1531
|
constructor(e) {
|
|
1532
1532
|
super(), this.isTransformControlsRoot = !0, this.controls = e, this.visible = !1;
|
|
1533
1533
|
}
|
|
@@ -1540,16 +1540,16 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1540
1540
|
e.geometry && e.geometry.dispose(), e.material && e.material.dispose();
|
|
1541
1541
|
});
|
|
1542
1542
|
}
|
|
1543
|
-
},
|
|
1543
|
+
}, Ar = class extends st {
|
|
1544
1544
|
constructor() {
|
|
1545
1545
|
super(), this.isTransformControlsGizmo = !0, this.type = "TransformControlsGizmo";
|
|
1546
|
-
let e = new
|
|
1546
|
+
let e = new Qe({
|
|
1547
1547
|
depthTest: !1,
|
|
1548
1548
|
depthWrite: !1,
|
|
1549
1549
|
fog: !1,
|
|
1550
1550
|
toneMapped: !1,
|
|
1551
1551
|
transparent: !0
|
|
1552
|
-
}), t = new
|
|
1552
|
+
}), t = new ze({
|
|
1553
1553
|
depthTest: !1,
|
|
1554
1554
|
depthWrite: !1,
|
|
1555
1555
|
fog: !1,
|
|
@@ -1588,12 +1588,12 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1588
1588
|
zAxisTransparent: l,
|
|
1589
1589
|
activeTransparent: d
|
|
1590
1590
|
};
|
|
1591
|
-
let m = new
|
|
1591
|
+
let m = new V(0, .04, .1, 12);
|
|
1592
1592
|
m.translate(0, .05, 0);
|
|
1593
|
-
let h = new
|
|
1593
|
+
let h = new B(.08, .08, .08);
|
|
1594
1594
|
h.translate(0, .04, 0);
|
|
1595
|
-
let g = new
|
|
1596
|
-
g.setAttribute("position", new
|
|
1595
|
+
let g = new ye();
|
|
1596
|
+
g.setAttribute("position", new Oe([
|
|
1597
1597
|
0,
|
|
1598
1598
|
0,
|
|
1599
1599
|
0,
|
|
@@ -1601,15 +1601,15 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1601
1601
|
0,
|
|
1602
1602
|
0
|
|
1603
1603
|
], 3));
|
|
1604
|
-
let _ = new
|
|
1604
|
+
let _ = new V(.0075, .0075, .5, 3);
|
|
1605
1605
|
_.translate(0, .25, 0);
|
|
1606
1606
|
function v(e, t) {
|
|
1607
|
-
let n = new
|
|
1607
|
+
let n = new jt(e, .0075, 3, 64, t * Math.PI * 2);
|
|
1608
1608
|
return n.rotateY(Math.PI / 2), n.rotateX(Math.PI / 2), n;
|
|
1609
1609
|
}
|
|
1610
1610
|
function y() {
|
|
1611
|
-
let e = new
|
|
1612
|
-
return e.setAttribute("position", new
|
|
1611
|
+
let e = new ye();
|
|
1612
|
+
return e.setAttribute("position", new Oe([
|
|
1613
1613
|
0,
|
|
1614
1614
|
0,
|
|
1615
1615
|
0,
|
|
@@ -1621,7 +1621,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1621
1621
|
let b = {
|
|
1622
1622
|
X: [
|
|
1623
1623
|
[
|
|
1624
|
-
new
|
|
1624
|
+
new U(m, i),
|
|
1625
1625
|
[
|
|
1626
1626
|
.5,
|
|
1627
1627
|
0,
|
|
@@ -1634,7 +1634,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1634
1634
|
]
|
|
1635
1635
|
],
|
|
1636
1636
|
[
|
|
1637
|
-
new
|
|
1637
|
+
new U(m, i),
|
|
1638
1638
|
[
|
|
1639
1639
|
-.5,
|
|
1640
1640
|
0,
|
|
@@ -1647,7 +1647,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1647
1647
|
]
|
|
1648
1648
|
],
|
|
1649
1649
|
[
|
|
1650
|
-
new
|
|
1650
|
+
new U(_, i),
|
|
1651
1651
|
[
|
|
1652
1652
|
0,
|
|
1653
1653
|
0,
|
|
@@ -1661,13 +1661,13 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1661
1661
|
]
|
|
1662
1662
|
],
|
|
1663
1663
|
Y: [
|
|
1664
|
-
[new
|
|
1664
|
+
[new U(m, a), [
|
|
1665
1665
|
0,
|
|
1666
1666
|
.5,
|
|
1667
1667
|
0
|
|
1668
1668
|
]],
|
|
1669
1669
|
[
|
|
1670
|
-
new
|
|
1670
|
+
new U(m, a),
|
|
1671
1671
|
[
|
|
1672
1672
|
0,
|
|
1673
1673
|
-.5,
|
|
@@ -1679,11 +1679,11 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1679
1679
|
0
|
|
1680
1680
|
]
|
|
1681
1681
|
],
|
|
1682
|
-
[new
|
|
1682
|
+
[new U(_, a)]
|
|
1683
1683
|
],
|
|
1684
1684
|
Z: [
|
|
1685
1685
|
[
|
|
1686
|
-
new
|
|
1686
|
+
new U(m, o),
|
|
1687
1687
|
[
|
|
1688
1688
|
0,
|
|
1689
1689
|
0,
|
|
@@ -1696,7 +1696,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1696
1696
|
]
|
|
1697
1697
|
],
|
|
1698
1698
|
[
|
|
1699
|
-
new
|
|
1699
|
+
new U(m, o),
|
|
1700
1700
|
[
|
|
1701
1701
|
0,
|
|
1702
1702
|
0,
|
|
@@ -1709,7 +1709,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1709
1709
|
]
|
|
1710
1710
|
],
|
|
1711
1711
|
[
|
|
1712
|
-
new
|
|
1712
|
+
new U(_, o),
|
|
1713
1713
|
null,
|
|
1714
1714
|
[
|
|
1715
1715
|
Math.PI / 2,
|
|
@@ -1718,18 +1718,18 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1718
1718
|
]
|
|
1719
1719
|
]
|
|
1720
1720
|
],
|
|
1721
|
-
XYZ: [[new
|
|
1721
|
+
XYZ: [[new U(new ct(.1, 0), u), [
|
|
1722
1722
|
0,
|
|
1723
1723
|
0,
|
|
1724
1724
|
0
|
|
1725
1725
|
]]],
|
|
1726
|
-
XY: [[new
|
|
1726
|
+
XY: [[new U(new B(.15, .15, .01), l), [
|
|
1727
1727
|
.15,
|
|
1728
1728
|
.15,
|
|
1729
1729
|
0
|
|
1730
1730
|
]]],
|
|
1731
1731
|
YZ: [[
|
|
1732
|
-
new
|
|
1732
|
+
new U(new B(.15, .15, .01), s),
|
|
1733
1733
|
[
|
|
1734
1734
|
0,
|
|
1735
1735
|
.15,
|
|
@@ -1742,7 +1742,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1742
1742
|
]
|
|
1743
1743
|
]],
|
|
1744
1744
|
XZ: [[
|
|
1745
|
-
new
|
|
1745
|
+
new U(new B(.15, .15, .01), c),
|
|
1746
1746
|
[
|
|
1747
1747
|
.15,
|
|
1748
1748
|
0,
|
|
@@ -1756,7 +1756,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1756
1756
|
]]
|
|
1757
1757
|
}, x = {
|
|
1758
1758
|
X: [[
|
|
1759
|
-
new
|
|
1759
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
1760
1760
|
[
|
|
1761
1761
|
.3,
|
|
1762
1762
|
0,
|
|
@@ -1768,7 +1768,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1768
1768
|
-Math.PI / 2
|
|
1769
1769
|
]
|
|
1770
1770
|
], [
|
|
1771
|
-
new
|
|
1771
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
1772
1772
|
[
|
|
1773
1773
|
-.3,
|
|
1774
1774
|
0,
|
|
@@ -1780,12 +1780,12 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1780
1780
|
Math.PI / 2
|
|
1781
1781
|
]
|
|
1782
1782
|
]],
|
|
1783
|
-
Y: [[new
|
|
1783
|
+
Y: [[new U(new V(.2, 0, .6, 4), n), [
|
|
1784
1784
|
0,
|
|
1785
1785
|
.3,
|
|
1786
1786
|
0
|
|
1787
1787
|
]], [
|
|
1788
|
-
new
|
|
1788
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
1789
1789
|
[
|
|
1790
1790
|
0,
|
|
1791
1791
|
-.3,
|
|
@@ -1798,7 +1798,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1798
1798
|
]
|
|
1799
1799
|
]],
|
|
1800
1800
|
Z: [[
|
|
1801
|
-
new
|
|
1801
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
1802
1802
|
[
|
|
1803
1803
|
0,
|
|
1804
1804
|
0,
|
|
@@ -1810,7 +1810,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1810
1810
|
0
|
|
1811
1811
|
]
|
|
1812
1812
|
], [
|
|
1813
|
-
new
|
|
1813
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
1814
1814
|
[
|
|
1815
1815
|
0,
|
|
1816
1816
|
0,
|
|
@@ -1822,14 +1822,14 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1822
1822
|
0
|
|
1823
1823
|
]
|
|
1824
1824
|
]],
|
|
1825
|
-
XYZ: [[new
|
|
1826
|
-
XY: [[new
|
|
1825
|
+
XYZ: [[new U(new ct(.2, 0), n)]],
|
|
1826
|
+
XY: [[new U(new B(.2, .2, .01), n), [
|
|
1827
1827
|
.15,
|
|
1828
1828
|
.15,
|
|
1829
1829
|
0
|
|
1830
1830
|
]]],
|
|
1831
1831
|
YZ: [[
|
|
1832
|
-
new
|
|
1832
|
+
new U(new B(.2, .2, .01), n),
|
|
1833
1833
|
[
|
|
1834
1834
|
0,
|
|
1835
1835
|
.15,
|
|
@@ -1842,7 +1842,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1842
1842
|
]
|
|
1843
1843
|
]],
|
|
1844
1844
|
XZ: [[
|
|
1845
|
-
new
|
|
1845
|
+
new U(new B(.2, .2, .01), n),
|
|
1846
1846
|
[
|
|
1847
1847
|
.15,
|
|
1848
1848
|
0,
|
|
@@ -1856,28 +1856,28 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1856
1856
|
]]
|
|
1857
1857
|
}, S = {
|
|
1858
1858
|
START: [[
|
|
1859
|
-
new
|
|
1859
|
+
new U(new ct(.01, 2), r),
|
|
1860
1860
|
null,
|
|
1861
1861
|
null,
|
|
1862
1862
|
null,
|
|
1863
1863
|
"helper"
|
|
1864
1864
|
]],
|
|
1865
1865
|
END: [[
|
|
1866
|
-
new
|
|
1866
|
+
new U(new ct(.01, 2), r),
|
|
1867
1867
|
null,
|
|
1868
1868
|
null,
|
|
1869
1869
|
null,
|
|
1870
1870
|
"helper"
|
|
1871
1871
|
]],
|
|
1872
1872
|
DELTA: [[
|
|
1873
|
-
new
|
|
1873
|
+
new Re(y(), r),
|
|
1874
1874
|
null,
|
|
1875
1875
|
null,
|
|
1876
1876
|
null,
|
|
1877
1877
|
"helper"
|
|
1878
1878
|
]],
|
|
1879
1879
|
X: [[
|
|
1880
|
-
new
|
|
1880
|
+
new Re(g, r),
|
|
1881
1881
|
[
|
|
1882
1882
|
-1e3,
|
|
1883
1883
|
0,
|
|
@@ -1892,7 +1892,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1892
1892
|
"helper"
|
|
1893
1893
|
]],
|
|
1894
1894
|
Y: [[
|
|
1895
|
-
new
|
|
1895
|
+
new Re(g, r),
|
|
1896
1896
|
[
|
|
1897
1897
|
0,
|
|
1898
1898
|
-1e3,
|
|
@@ -1911,7 +1911,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1911
1911
|
"helper"
|
|
1912
1912
|
]],
|
|
1913
1913
|
Z: [[
|
|
1914
|
-
new
|
|
1914
|
+
new Re(g, r),
|
|
1915
1915
|
[
|
|
1916
1916
|
0,
|
|
1917
1917
|
0,
|
|
@@ -1931,7 +1931,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1931
1931
|
]]
|
|
1932
1932
|
}, C = {
|
|
1933
1933
|
XYZE: [[
|
|
1934
|
-
new
|
|
1934
|
+
new U(v(.5, 1), p),
|
|
1935
1935
|
null,
|
|
1936
1936
|
[
|
|
1937
1937
|
0,
|
|
@@ -1939,9 +1939,9 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1939
1939
|
0
|
|
1940
1940
|
]
|
|
1941
1941
|
]],
|
|
1942
|
-
X: [[new
|
|
1942
|
+
X: [[new U(v(.5, .5), i)]],
|
|
1943
1943
|
Y: [[
|
|
1944
|
-
new
|
|
1944
|
+
new U(v(.5, .5), a),
|
|
1945
1945
|
null,
|
|
1946
1946
|
[
|
|
1947
1947
|
0,
|
|
@@ -1950,7 +1950,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1950
1950
|
]
|
|
1951
1951
|
]],
|
|
1952
1952
|
Z: [[
|
|
1953
|
-
new
|
|
1953
|
+
new U(v(.5, .5), o),
|
|
1954
1954
|
null,
|
|
1955
1955
|
[
|
|
1956
1956
|
0,
|
|
@@ -1959,7 +1959,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1959
1959
|
]
|
|
1960
1960
|
]],
|
|
1961
1961
|
E: [[
|
|
1962
|
-
new
|
|
1962
|
+
new U(v(.75, 1), d),
|
|
1963
1963
|
null,
|
|
1964
1964
|
[
|
|
1965
1965
|
0,
|
|
@@ -1968,7 +1968,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1968
1968
|
]
|
|
1969
1969
|
]]
|
|
1970
1970
|
}, w = { AXIS: [[
|
|
1971
|
-
new
|
|
1971
|
+
new Re(g, r),
|
|
1972
1972
|
[
|
|
1973
1973
|
-1e3,
|
|
1974
1974
|
0,
|
|
@@ -1982,9 +1982,9 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1982
1982
|
],
|
|
1983
1983
|
"helper"
|
|
1984
1984
|
]] }, T = {
|
|
1985
|
-
XYZE: [[new
|
|
1985
|
+
XYZE: [[new U(new Tt(.25, 10, 8), n)]],
|
|
1986
1986
|
X: [[
|
|
1987
|
-
new
|
|
1987
|
+
new U(new jt(.5, .1, 4, 24), n),
|
|
1988
1988
|
[
|
|
1989
1989
|
0,
|
|
1990
1990
|
0,
|
|
@@ -1997,7 +1997,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
1997
1997
|
]
|
|
1998
1998
|
]],
|
|
1999
1999
|
Y: [[
|
|
2000
|
-
new
|
|
2000
|
+
new U(new jt(.5, .1, 4, 24), n),
|
|
2001
2001
|
[
|
|
2002
2002
|
0,
|
|
2003
2003
|
0,
|
|
@@ -2010,7 +2010,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2010
2010
|
]
|
|
2011
2011
|
]],
|
|
2012
2012
|
Z: [[
|
|
2013
|
-
new
|
|
2013
|
+
new U(new jt(.5, .1, 4, 24), n),
|
|
2014
2014
|
[
|
|
2015
2015
|
0,
|
|
2016
2016
|
0,
|
|
@@ -2022,11 +2022,11 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2022
2022
|
-Math.PI / 2
|
|
2023
2023
|
]
|
|
2024
2024
|
]],
|
|
2025
|
-
E: [[new
|
|
2025
|
+
E: [[new U(new jt(.75, .1, 2, 24), n)]]
|
|
2026
2026
|
}, E = {
|
|
2027
2027
|
X: [
|
|
2028
2028
|
[
|
|
2029
|
-
new
|
|
2029
|
+
new U(h, i),
|
|
2030
2030
|
[
|
|
2031
2031
|
.5,
|
|
2032
2032
|
0,
|
|
@@ -2039,7 +2039,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2039
2039
|
]
|
|
2040
2040
|
],
|
|
2041
2041
|
[
|
|
2042
|
-
new
|
|
2042
|
+
new U(_, i),
|
|
2043
2043
|
[
|
|
2044
2044
|
0,
|
|
2045
2045
|
0,
|
|
@@ -2052,7 +2052,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2052
2052
|
]
|
|
2053
2053
|
],
|
|
2054
2054
|
[
|
|
2055
|
-
new
|
|
2055
|
+
new U(h, i),
|
|
2056
2056
|
[
|
|
2057
2057
|
-.5,
|
|
2058
2058
|
0,
|
|
@@ -2066,14 +2066,14 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2066
2066
|
]
|
|
2067
2067
|
],
|
|
2068
2068
|
Y: [
|
|
2069
|
-
[new
|
|
2069
|
+
[new U(h, a), [
|
|
2070
2070
|
0,
|
|
2071
2071
|
.5,
|
|
2072
2072
|
0
|
|
2073
2073
|
]],
|
|
2074
|
-
[new
|
|
2074
|
+
[new U(_, a)],
|
|
2075
2075
|
[
|
|
2076
|
-
new
|
|
2076
|
+
new U(h, a),
|
|
2077
2077
|
[
|
|
2078
2078
|
0,
|
|
2079
2079
|
-.5,
|
|
@@ -2088,7 +2088,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2088
2088
|
],
|
|
2089
2089
|
Z: [
|
|
2090
2090
|
[
|
|
2091
|
-
new
|
|
2091
|
+
new U(h, o),
|
|
2092
2092
|
[
|
|
2093
2093
|
0,
|
|
2094
2094
|
0,
|
|
@@ -2101,7 +2101,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2101
2101
|
]
|
|
2102
2102
|
],
|
|
2103
2103
|
[
|
|
2104
|
-
new
|
|
2104
|
+
new U(_, o),
|
|
2105
2105
|
[
|
|
2106
2106
|
0,
|
|
2107
2107
|
0,
|
|
@@ -2114,7 +2114,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2114
2114
|
]
|
|
2115
2115
|
],
|
|
2116
2116
|
[
|
|
2117
|
-
new
|
|
2117
|
+
new U(h, o),
|
|
2118
2118
|
[
|
|
2119
2119
|
0,
|
|
2120
2120
|
0,
|
|
@@ -2127,13 +2127,13 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2127
2127
|
]
|
|
2128
2128
|
]
|
|
2129
2129
|
],
|
|
2130
|
-
XY: [[new
|
|
2130
|
+
XY: [[new U(new B(.15, .15, .01), l), [
|
|
2131
2131
|
.15,
|
|
2132
2132
|
.15,
|
|
2133
2133
|
0
|
|
2134
2134
|
]]],
|
|
2135
2135
|
YZ: [[
|
|
2136
|
-
new
|
|
2136
|
+
new U(new B(.15, .15, .01), s),
|
|
2137
2137
|
[
|
|
2138
2138
|
0,
|
|
2139
2139
|
.15,
|
|
@@ -2146,7 +2146,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2146
2146
|
]
|
|
2147
2147
|
]],
|
|
2148
2148
|
XZ: [[
|
|
2149
|
-
new
|
|
2149
|
+
new U(new B(.15, .15, .01), c),
|
|
2150
2150
|
[
|
|
2151
2151
|
.15,
|
|
2152
2152
|
0,
|
|
@@ -2158,10 +2158,10 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2158
2158
|
0
|
|
2159
2159
|
]
|
|
2160
2160
|
]],
|
|
2161
|
-
XYZ: [[new
|
|
2161
|
+
XYZ: [[new U(new B(.1, .1, .1), u)]]
|
|
2162
2162
|
}, D = {
|
|
2163
2163
|
X: [[
|
|
2164
|
-
new
|
|
2164
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
2165
2165
|
[
|
|
2166
2166
|
.3,
|
|
2167
2167
|
0,
|
|
@@ -2173,7 +2173,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2173
2173
|
-Math.PI / 2
|
|
2174
2174
|
]
|
|
2175
2175
|
], [
|
|
2176
|
-
new
|
|
2176
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
2177
2177
|
[
|
|
2178
2178
|
-.3,
|
|
2179
2179
|
0,
|
|
@@ -2185,12 +2185,12 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2185
2185
|
Math.PI / 2
|
|
2186
2186
|
]
|
|
2187
2187
|
]],
|
|
2188
|
-
Y: [[new
|
|
2188
|
+
Y: [[new U(new V(.2, 0, .6, 4), n), [
|
|
2189
2189
|
0,
|
|
2190
2190
|
.3,
|
|
2191
2191
|
0
|
|
2192
2192
|
]], [
|
|
2193
|
-
new
|
|
2193
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
2194
2194
|
[
|
|
2195
2195
|
0,
|
|
2196
2196
|
-.3,
|
|
@@ -2203,7 +2203,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2203
2203
|
]
|
|
2204
2204
|
]],
|
|
2205
2205
|
Z: [[
|
|
2206
|
-
new
|
|
2206
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
2207
2207
|
[
|
|
2208
2208
|
0,
|
|
2209
2209
|
0,
|
|
@@ -2215,7 +2215,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2215
2215
|
0
|
|
2216
2216
|
]
|
|
2217
2217
|
], [
|
|
2218
|
-
new
|
|
2218
|
+
new U(new V(.2, 0, .6, 4), n),
|
|
2219
2219
|
[
|
|
2220
2220
|
0,
|
|
2221
2221
|
0,
|
|
@@ -2227,13 +2227,13 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2227
2227
|
0
|
|
2228
2228
|
]
|
|
2229
2229
|
]],
|
|
2230
|
-
XY: [[new
|
|
2230
|
+
XY: [[new U(new B(.2, .2, .01), n), [
|
|
2231
2231
|
.15,
|
|
2232
2232
|
.15,
|
|
2233
2233
|
0
|
|
2234
2234
|
]]],
|
|
2235
2235
|
YZ: [[
|
|
2236
|
-
new
|
|
2236
|
+
new U(new B(.2, .2, .01), n),
|
|
2237
2237
|
[
|
|
2238
2238
|
0,
|
|
2239
2239
|
.15,
|
|
@@ -2246,7 +2246,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2246
2246
|
]
|
|
2247
2247
|
]],
|
|
2248
2248
|
XZ: [[
|
|
2249
|
-
new
|
|
2249
|
+
new U(new B(.2, .2, .01), n),
|
|
2250
2250
|
[
|
|
2251
2251
|
.15,
|
|
2252
2252
|
0,
|
|
@@ -2258,14 +2258,14 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2258
2258
|
0
|
|
2259
2259
|
]
|
|
2260
2260
|
]],
|
|
2261
|
-
XYZ: [[new
|
|
2261
|
+
XYZ: [[new U(new B(.2, .2, .2), n), [
|
|
2262
2262
|
0,
|
|
2263
2263
|
0,
|
|
2264
2264
|
0
|
|
2265
2265
|
]]]
|
|
2266
2266
|
}, O = {
|
|
2267
2267
|
X: [[
|
|
2268
|
-
new
|
|
2268
|
+
new Re(g, r),
|
|
2269
2269
|
[
|
|
2270
2270
|
-1e3,
|
|
2271
2271
|
0,
|
|
@@ -2280,7 +2280,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2280
2280
|
"helper"
|
|
2281
2281
|
]],
|
|
2282
2282
|
Y: [[
|
|
2283
|
-
new
|
|
2283
|
+
new Re(g, r),
|
|
2284
2284
|
[
|
|
2285
2285
|
0,
|
|
2286
2286
|
-1e3,
|
|
@@ -2299,7 +2299,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2299
2299
|
"helper"
|
|
2300
2300
|
]],
|
|
2301
2301
|
Z: [[
|
|
2302
|
-
new
|
|
2302
|
+
new Re(g, r),
|
|
2303
2303
|
[
|
|
2304
2304
|
0,
|
|
2305
2305
|
0,
|
|
@@ -2319,7 +2319,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2319
2319
|
]]
|
|
2320
2320
|
};
|
|
2321
2321
|
function k(e) {
|
|
2322
|
-
let t = new
|
|
2322
|
+
let t = new st();
|
|
2323
2323
|
for (let n in e) for (let r = e[n].length; r--;) {
|
|
2324
2324
|
let i = e[n][r][0].clone(), a = e[n][r][1], o = e[n][r][2], s = e[n][r][3], c = e[n][r][4];
|
|
2325
2325
|
i.name = n, i.tag = c, a && i.position.set(a[0], a[1], a[2]), o && i.rotation.set(o[0], o[1], o[2]), s && i.scale.set(s[0], s[1], s[2]), i.updateMatrix();
|
|
@@ -2331,7 +2331,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2331
2331
|
this.gizmo = {}, this.picker = {}, this.helper = {}, this.add(this.gizmo.translate = k(b)), this.add(this.gizmo.rotate = k(C)), this.add(this.gizmo.scale = k(E)), this.add(this.picker.translate = k(x)), this.add(this.picker.rotate = k(T)), this.add(this.picker.scale = k(D)), this.add(this.helper.translate = k(S)), this.add(this.helper.rotate = k(w)), this.add(this.helper.scale = k(O)), this.picker.translate.visible = !1, this.picker.rotate.visible = !1, this.picker.scale.visible = !1;
|
|
2332
2332
|
}
|
|
2333
2333
|
updateMatrixWorld(e) {
|
|
2334
|
-
let t = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion :
|
|
2334
|
+
let t = (this.mode === "scale" ? "local" : this.space) === "local" ? this.worldQuaternion : br;
|
|
2335
2335
|
this.gizmo.translate.visible = this.mode === "translate", this.gizmo.rotate.visible = this.mode === "rotate", this.gizmo.scale.visible = this.mode === "scale", this.helper.translate.visible = this.mode === "translate", this.helper.rotate.visible = this.mode === "rotate", this.helper.scale.visible = this.mode === "scale";
|
|
2336
2336
|
let n = [];
|
|
2337
2337
|
n = n.concat(this.picker[this.mode].children), n = n.concat(this.gizmo[this.mode].children), n = n.concat(this.helper[this.mode].children);
|
|
@@ -2340,25 +2340,25 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2340
2340
|
r.visible = !0, r.rotation.set(0, 0, 0), r.position.copy(this.worldPosition);
|
|
2341
2341
|
let i;
|
|
2342
2342
|
if (i = this.camera.isOrthographicCamera ? (this.camera.top - this.camera.bottom) / this.camera.zoom : this.worldPosition.distanceTo(this.cameraPosition) * Math.min(1.9 * Math.tan(Math.PI * this.camera.fov / 360) / this.camera.zoom, 7), r.scale.set(1, 1, 1).multiplyScalar(i * this.size / 4), r.tag === "helper") {
|
|
2343
|
-
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (
|
|
2343
|
+
r.visible = !1, r.name === "AXIS" ? (r.visible = !!this.axis, this.axis === "X" && (X.setFromEuler(gr.set(0, 0, 0)), r.quaternion.copy(t).multiply(X), Math.abs(Z.copy(Cr).applyQuaternion(t).dot(this.eye)) > .9 && (r.visible = !1)), this.axis === "Y" && (X.setFromEuler(gr.set(0, 0, Math.PI / 2)), r.quaternion.copy(t).multiply(X), Math.abs(Z.copy(wr).applyQuaternion(t).dot(this.eye)) > .9 && (r.visible = !1)), this.axis === "Z" && (X.setFromEuler(gr.set(0, Math.PI / 2, 0)), r.quaternion.copy(t).multiply(X), Math.abs(Z.copy(Tr).applyQuaternion(t).dot(this.eye)) > .9 && (r.visible = !1)), this.axis === "XYZE" && (X.setFromEuler(gr.set(0, Math.PI / 2, 0)), Z.copy(this.rotationAxis), r.quaternion.setFromRotationMatrix(vr.lookAt(_r, Z, wr)), r.quaternion.multiply(X), r.visible = this.dragging), this.axis === "E" && (r.visible = !1)) : r.name === "START" ? (r.position.copy(this.worldPositionStart), r.visible = this.dragging) : r.name === "END" ? (r.position.copy(this.worldPosition), r.visible = this.dragging) : r.name === "DELTA" ? (r.position.copy(this.worldPositionStart), r.quaternion.copy(this.worldQuaternionStart), Y.set(1e-10, 1e-10, 1e-10).add(this.worldPositionStart).sub(this.worldPosition).multiplyScalar(-1), Y.applyQuaternion(this.worldQuaternionStart.clone().invert()), r.scale.copy(Y), r.visible = this.dragging) : (r.quaternion.copy(t), this.dragging ? r.position.copy(this.worldPositionStart) : r.position.copy(this.worldPosition), this.axis && (r.visible = this.axis.search(r.name) !== -1));
|
|
2344
2344
|
continue;
|
|
2345
2345
|
}
|
|
2346
2346
|
if (r.quaternion.copy(t), this.mode === "translate" || this.mode === "scale") {
|
|
2347
2347
|
let e = .99, n = .2;
|
|
2348
|
-
r.name === "X" && Math.abs(
|
|
2349
|
-
} else this.mode === "rotate" && (
|
|
2348
|
+
r.name === "X" && Math.abs(Z.copy(Cr).applyQuaternion(t).dot(this.eye)) > e && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Y" && Math.abs(Z.copy(wr).applyQuaternion(t).dot(this.eye)) > e && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "Z" && Math.abs(Z.copy(Tr).applyQuaternion(t).dot(this.eye)) > e && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XY" && Math.abs(Z.copy(Tr).applyQuaternion(t).dot(this.eye)) < n && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "YZ" && Math.abs(Z.copy(Cr).applyQuaternion(t).dot(this.eye)) < n && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1), r.name === "XZ" && Math.abs(Z.copy(wr).applyQuaternion(t).dot(this.eye)) < n && (r.scale.set(1e-10, 1e-10, 1e-10), r.visible = !1);
|
|
2349
|
+
} else this.mode === "rotate" && (yr.copy(t), Z.copy(this.eye).applyQuaternion(X.copy(t).invert()), r.name.search("E") !== -1 && r.quaternion.setFromRotationMatrix(vr.lookAt(this.eye, _r, wr)), r.name === "X" && (X.setFromAxisAngle(Cr, Math.atan2(-Z.y, Z.z)), X.multiplyQuaternions(yr, X), r.quaternion.copy(X)), r.name === "Y" && (X.setFromAxisAngle(wr, Math.atan2(Z.x, Z.z)), X.multiplyQuaternions(yr, X), r.quaternion.copy(X)), r.name === "Z" && (X.setFromAxisAngle(Tr, Math.atan2(Z.y, Z.x)), X.multiplyQuaternions(yr, X), r.quaternion.copy(X)));
|
|
2350
2350
|
r.visible = r.visible && (r.name.indexOf("X") === -1 || this.showX), r.visible = r.visible && (r.name.indexOf("Y") === -1 || this.showY), r.visible = r.visible && (r.name.indexOf("Z") === -1 || this.showZ), r.visible = r.visible && (r.name.indexOf("E") === -1 || this.showX && this.showY && this.showZ), r.visible = r.visible && (r.name.indexOf("XY") === -1 || this.showXY), r.visible = r.visible && (r.name.indexOf("YZ") === -1 || this.showYZ), r.visible = r.visible && (r.name.indexOf("XZ") === -1 || this.showXZ), r.material._color = r.material._color || r.material.color.clone(), r.material._opacity = r.material._opacity || r.material.opacity, r.material.color.copy(r.material._color), r.material.opacity = r.material._opacity, this.enabled && this.axis && (r.name === this.axis || this.axis.split("").some(function(e) {
|
|
2351
2351
|
return r.name === e;
|
|
2352
2352
|
})) && (r.material.color.copy(this.materialLib.active.color), r.material.opacity = 1);
|
|
2353
2353
|
}
|
|
2354
2354
|
super.updateMatrixWorld(e);
|
|
2355
2355
|
}
|
|
2356
|
-
},
|
|
2356
|
+
}, jr = class extends U {
|
|
2357
2357
|
constructor() {
|
|
2358
|
-
super(new
|
|
2358
|
+
super(new ft(1e5, 1e5, 2, 2), new Qe({
|
|
2359
2359
|
visible: !1,
|
|
2360
2360
|
wireframe: !0,
|
|
2361
|
-
side:
|
|
2361
|
+
side: Te,
|
|
2362
2362
|
transparent: !0,
|
|
2363
2363
|
opacity: .1,
|
|
2364
2364
|
toneMapped: !1
|
|
@@ -2366,41 +2366,41 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2366
2366
|
}
|
|
2367
2367
|
updateMatrixWorld(e) {
|
|
2368
2368
|
let t = this.space;
|
|
2369
|
-
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"),
|
|
2369
|
+
switch (this.position.copy(this.worldPosition), this.mode === "scale" && (t = "local"), Er.copy(Cr).applyQuaternion(t === "local" ? this.worldQuaternion : br), Dr.copy(wr).applyQuaternion(t === "local" ? this.worldQuaternion : br), Or.copy(Tr).applyQuaternion(t === "local" ? this.worldQuaternion : br), Z.copy(Dr), this.mode) {
|
|
2370
2370
|
case "translate":
|
|
2371
2371
|
case "scale":
|
|
2372
2372
|
switch (this.axis) {
|
|
2373
2373
|
case "X":
|
|
2374
|
-
|
|
2374
|
+
Z.copy(this.eye).cross(Er), xr.copy(Er).cross(Z);
|
|
2375
2375
|
break;
|
|
2376
2376
|
case "Y":
|
|
2377
|
-
|
|
2377
|
+
Z.copy(this.eye).cross(Dr), xr.copy(Dr).cross(Z);
|
|
2378
2378
|
break;
|
|
2379
2379
|
case "Z":
|
|
2380
|
-
|
|
2380
|
+
Z.copy(this.eye).cross(Or), xr.copy(Or).cross(Z);
|
|
2381
2381
|
break;
|
|
2382
2382
|
case "XY":
|
|
2383
|
-
|
|
2383
|
+
xr.copy(Or);
|
|
2384
2384
|
break;
|
|
2385
2385
|
case "YZ":
|
|
2386
|
-
|
|
2386
|
+
xr.copy(Er);
|
|
2387
2387
|
break;
|
|
2388
2388
|
case "XZ":
|
|
2389
|
-
|
|
2389
|
+
Z.copy(Or), xr.copy(Dr);
|
|
2390
2390
|
break;
|
|
2391
2391
|
case "XYZ":
|
|
2392
2392
|
case "E":
|
|
2393
|
-
|
|
2393
|
+
xr.set(0, 0, 0);
|
|
2394
2394
|
break;
|
|
2395
2395
|
}
|
|
2396
2396
|
break;
|
|
2397
|
-
default:
|
|
2397
|
+
default: xr.set(0, 0, 0);
|
|
2398
2398
|
}
|
|
2399
|
-
|
|
2399
|
+
xr.length() === 0 ? this.quaternion.copy(this.cameraQuaternion) : (Sr.lookAt(Y.set(0, 0, 0), xr, Z), this.quaternion.setFromRotationMatrix(Sr)), super.updateMatrixWorld(e);
|
|
2400
2400
|
}
|
|
2401
|
-
},
|
|
2401
|
+
}, Mr = class extends st {
|
|
2402
2402
|
constructor(e = document.createElement("div")) {
|
|
2403
|
-
super(), this.isCSS2DObject = !0, this.element = e, this.element.style.position = "absolute", this.element.style.userSelect = "none", this.element.setAttribute("draggable", !1), this.center = new
|
|
2403
|
+
super(), this.isCSS2DObject = !0, this.element = e, this.element.style.position = "absolute", this.element.style.userSelect = "none", this.element.setAttribute("draggable", !1), this.center = new G(.5, .5), this.addEventListener("removed", function() {
|
|
2404
2404
|
this.traverse(function(e) {
|
|
2405
2405
|
e.element && e.element instanceof e.element.ownerDocument.defaultView.Element && e.element.parentNode !== null && e.element.remove();
|
|
2406
2406
|
});
|
|
@@ -2409,7 +2409,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2409
2409
|
copy(e, t) {
|
|
2410
2410
|
return super.copy(e, t), this.element = e.element.cloneNode(!0), this.center = e.center, this;
|
|
2411
2411
|
}
|
|
2412
|
-
},
|
|
2412
|
+
}, Nr = new K(), Pr = new Ze(), Fr = new Ze(), Ir = new K(), Lr = new K(), Rr = class {
|
|
2413
2413
|
constructor(e = {}) {
|
|
2414
2414
|
let t = this, n, r, i, a, o = { objects: /* @__PURE__ */ new WeakMap() }, s = e.element === void 0 ? document.createElement("div") : e.element;
|
|
2415
2415
|
s.style.overflow = "hidden", this.domElement = s, this.sortObjects = !0, this.getSize = function() {
|
|
@@ -2418,7 +2418,7 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2418
2418
|
height: r
|
|
2419
2419
|
};
|
|
2420
2420
|
}, this.render = function(e, t) {
|
|
2421
|
-
e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), t.parent === null && t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(),
|
|
2421
|
+
e.matrixWorldAutoUpdate === !0 && e.updateMatrixWorld(), t.parent === null && t.matrixWorldAutoUpdate === !0 && t.updateMatrixWorld(), Pr.copy(t.matrixWorldInverse), Fr.multiplyMatrices(t.projectionMatrix, Pr), l(e, e, t), this.sortObjects && f(e);
|
|
2422
2422
|
}, this.setSize = function(e, t) {
|
|
2423
2423
|
n = e, r = t, i = n / 2, a = r / 2, s.style.width = e + "px", s.style.height = t + "px";
|
|
2424
2424
|
};
|
|
@@ -2432,16 +2432,16 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2432
2432
|
return;
|
|
2433
2433
|
}
|
|
2434
2434
|
if (e.isCSS2DObject) {
|
|
2435
|
-
|
|
2436
|
-
let c =
|
|
2437
|
-
l.style.display = c === !0 ? "" : "none", c === !0 && (e.onBeforeRender(t, n, r), l.style.transform = "translate(" + -100 * e.center.x + "%," + -100 * e.center.y + "%)translate(" + (
|
|
2435
|
+
Nr.setFromMatrixPosition(e.matrixWorld), Nr.applyMatrix4(Fr);
|
|
2436
|
+
let c = Nr.z >= -1 && Nr.z <= 1 && e.layers.test(r.layers) === !0, l = e.element;
|
|
2437
|
+
l.style.display = c === !0 ? "" : "none", c === !0 && (e.onBeforeRender(t, n, r), l.style.transform = "translate(" + -100 * e.center.x + "%," + -100 * e.center.y + "%)translate(" + (Nr.x * i + i) + "px," + (-Nr.y * a + a) + "px)", l.parentNode !== s && s.appendChild(l), e.onAfterRender(t, n, r));
|
|
2438
2438
|
let d = { distanceToCameraSquared: u(r, e) };
|
|
2439
2439
|
o.objects.set(e, d);
|
|
2440
2440
|
}
|
|
2441
2441
|
for (let t = 0, i = e.children.length; t < i; t++) l(e.children[t], n, r);
|
|
2442
2442
|
}
|
|
2443
2443
|
function u(e, t) {
|
|
2444
|
-
return
|
|
2444
|
+
return Ir.setFromMatrixPosition(e.matrixWorld), Lr.setFromMatrixPosition(t.matrixWorld), Ir.distanceToSquared(Lr);
|
|
2445
2445
|
}
|
|
2446
2446
|
function d(e) {
|
|
2447
2447
|
let t = [];
|
|
@@ -2459,9 +2459,9 @@ var _r = new Oe(), X = new W(0, 1, 0), vr = new W(0, 0, 0), yr = new $e(), br =
|
|
|
2459
2459
|
};
|
|
2460
2460
|
//#endregion
|
|
2461
2461
|
//#region ../../node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/utils/BufferGeometryUtils.js
|
|
2462
|
-
function
|
|
2463
|
-
if (t ===
|
|
2464
|
-
if (t ===
|
|
2462
|
+
function zr(e, t) {
|
|
2463
|
+
if (t === Pt) return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."), e;
|
|
2464
|
+
if (t === Mt || t === Nt) {
|
|
2465
2465
|
let n = e.getIndex();
|
|
2466
2466
|
if (n === null) {
|
|
2467
2467
|
let t = [], r = e.getAttribute("position");
|
|
@@ -2471,7 +2471,7 @@ function Br(e, t) {
|
|
|
2471
2471
|
} else return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."), e;
|
|
2472
2472
|
}
|
|
2473
2473
|
let r = n.count - 2, i = [];
|
|
2474
|
-
if (t ===
|
|
2474
|
+
if (t === Mt) for (let e = 1; e <= r; e++) i.push(n.getX(0)), i.push(n.getX(e)), i.push(n.getX(e + 1));
|
|
2475
2475
|
else for (let e = 0; e < r; e++) e % 2 == 0 ? (i.push(n.getX(e)), i.push(n.getX(e + 1)), i.push(n.getX(e + 2))) : (i.push(n.getX(e + 2)), i.push(n.getX(e + 1)), i.push(n.getX(e)));
|
|
2476
2476
|
i.length / 3 !== r && console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");
|
|
2477
2477
|
let a = e.clone();
|
|
@@ -2480,9 +2480,9 @@ function Br(e, t) {
|
|
|
2480
2480
|
}
|
|
2481
2481
|
//#endregion
|
|
2482
2482
|
//#region ../../node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/utils/SkeletonUtils.js
|
|
2483
|
-
function
|
|
2483
|
+
function Br(e) {
|
|
2484
2484
|
let t = /* @__PURE__ */ new Map(), n = /* @__PURE__ */ new Map(), r = e.clone();
|
|
2485
|
-
return
|
|
2485
|
+
return Vr(e, r, function(e, r) {
|
|
2486
2486
|
t.set(r, e), n.set(e, r);
|
|
2487
2487
|
}), r.traverse(function(e) {
|
|
2488
2488
|
if (!e.isSkinnedMesh) return;
|
|
@@ -2492,24 +2492,26 @@ function Vr(e) {
|
|
|
2492
2492
|
}), r.bind(r.skeleton, r.bindMatrix);
|
|
2493
2493
|
}), r;
|
|
2494
2494
|
}
|
|
2495
|
-
function
|
|
2495
|
+
function Vr(e, t, n) {
|
|
2496
2496
|
n(e, t);
|
|
2497
|
-
for (let r = 0; r < e.children.length; r++)
|
|
2497
|
+
for (let r = 0; r < e.children.length; r++) Vr(e.children[r], t.children[r], n);
|
|
2498
2498
|
}
|
|
2499
2499
|
//#endregion
|
|
2500
2500
|
//#region ../../node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/loaders/GLTFLoader.js
|
|
2501
|
-
var
|
|
2501
|
+
var Hr = /* @__PURE__ */ zt({ GLTFLoader: () => Ur }), Ur = class extends Ke {
|
|
2502
2502
|
constructor(e) {
|
|
2503
2503
|
super(e), this.dracoLoader = null, this.ktx2Loader = null, this.meshoptDecoder = null, this.pluginCallbacks = [], this.register(function(e) {
|
|
2504
|
+
return new Jr(e);
|
|
2505
|
+
}), this.register(function(e) {
|
|
2504
2506
|
return new Yr(e);
|
|
2505
2507
|
}), this.register(function(e) {
|
|
2506
|
-
return new
|
|
2508
|
+
return new ii(e);
|
|
2507
2509
|
}), this.register(function(e) {
|
|
2508
2510
|
return new ai(e);
|
|
2509
2511
|
}), this.register(function(e) {
|
|
2510
2512
|
return new oi(e);
|
|
2511
2513
|
}), this.register(function(e) {
|
|
2512
|
-
return new
|
|
2514
|
+
return new Zr(e);
|
|
2513
2515
|
}), this.register(function(e) {
|
|
2514
2516
|
return new Qr(e);
|
|
2515
2517
|
}), this.register(function(e) {
|
|
@@ -2517,38 +2519,36 @@ var Ur = /* @__PURE__ */ Vt({ GLTFLoader: () => Wr }), Wr = class extends Je {
|
|
|
2517
2519
|
}), this.register(function(e) {
|
|
2518
2520
|
return new ei(e);
|
|
2519
2521
|
}), this.register(function(e) {
|
|
2520
|
-
return new
|
|
2521
|
-
}), this.register(function(e) {
|
|
2522
|
-
return new Jr(e);
|
|
2522
|
+
return new qr(e);
|
|
2523
2523
|
}), this.register(function(e) {
|
|
2524
|
-
return new
|
|
2525
|
-
}), this.register(function(e) {
|
|
2526
|
-
return new Zr(e);
|
|
2524
|
+
return new ti(e);
|
|
2527
2525
|
}), this.register(function(e) {
|
|
2528
|
-
return new
|
|
2526
|
+
return new Xr(e);
|
|
2529
2527
|
}), this.register(function(e) {
|
|
2530
2528
|
return new ri(e);
|
|
2531
2529
|
}), this.register(function(e) {
|
|
2532
|
-
return new
|
|
2530
|
+
return new ni(e);
|
|
2531
|
+
}), this.register(function(e) {
|
|
2532
|
+
return new Gr(e);
|
|
2533
2533
|
}), this.register(function(e) {
|
|
2534
|
-
return new
|
|
2534
|
+
return new si(e, $.EXT_MESHOPT_COMPRESSION);
|
|
2535
2535
|
}), this.register(function(e) {
|
|
2536
|
-
return new
|
|
2536
|
+
return new si(e, $.KHR_MESHOPT_COMPRESSION);
|
|
2537
2537
|
}), this.register(function(e) {
|
|
2538
|
-
return new
|
|
2538
|
+
return new ci(e);
|
|
2539
2539
|
});
|
|
2540
2540
|
}
|
|
2541
2541
|
load(e, t, n, r) {
|
|
2542
2542
|
let i = this, a;
|
|
2543
2543
|
if (this.resourcePath !== "") a = this.resourcePath;
|
|
2544
2544
|
else if (this.path !== "") {
|
|
2545
|
-
let t =
|
|
2546
|
-
a =
|
|
2547
|
-
} else a =
|
|
2545
|
+
let t = qe.extractUrlBase(e);
|
|
2546
|
+
a = qe.resolveURL(t, this.path);
|
|
2547
|
+
} else a = qe.extractUrlBase(e);
|
|
2548
2548
|
this.manager.itemStart(e);
|
|
2549
2549
|
let o = function(t) {
|
|
2550
2550
|
r ? r(t) : console.error(t), i.manager.itemError(e), i.manager.itemEnd(e);
|
|
2551
|
-
}, s = new
|
|
2551
|
+
}, s = new De(this.manager);
|
|
2552
2552
|
s.setPath(this.path), s.setResponseType("arraybuffer"), s.setRequestHeader(this.requestHeader), s.setWithCredentials(this.withCredentials), s.load(e, function(n) {
|
|
2553
2553
|
try {
|
|
2554
2554
|
i.parse(n, a, function(n) {
|
|
@@ -2577,14 +2577,14 @@ var Ur = /* @__PURE__ */ Vt({ GLTFLoader: () => Wr }), Wr = class extends Je {
|
|
|
2577
2577
|
parse(e, t, n, r) {
|
|
2578
2578
|
let i, a = {}, o = {}, s = new TextDecoder();
|
|
2579
2579
|
if (typeof e == "string") i = JSON.parse(e);
|
|
2580
|
-
else if (e instanceof ArrayBuffer) if (s.decode(new Uint8Array(e, 0, 4)) ===
|
|
2580
|
+
else if (e instanceof ArrayBuffer) if (s.decode(new Uint8Array(e, 0, 4)) === li) {
|
|
2581
2581
|
try {
|
|
2582
|
-
a[
|
|
2582
|
+
a[$.KHR_BINARY_GLTF] = new fi(e);
|
|
2583
2583
|
} catch (e) {
|
|
2584
2584
|
r && r(e);
|
|
2585
2585
|
return;
|
|
2586
2586
|
}
|
|
2587
|
-
i = JSON.parse(a[
|
|
2587
|
+
i = JSON.parse(a[$.KHR_BINARY_GLTF].content);
|
|
2588
2588
|
} else i = JSON.parse(s.decode(e));
|
|
2589
2589
|
else i = e;
|
|
2590
2590
|
if (i.asset === void 0 || i.asset.version[0] < 2) {
|
|
@@ -2607,17 +2607,17 @@ var Ur = /* @__PURE__ */ Vt({ GLTFLoader: () => Wr }), Wr = class extends Je {
|
|
|
2607
2607
|
if (i.extensionsUsed) for (let e = 0; e < i.extensionsUsed.length; ++e) {
|
|
2608
2608
|
let t = i.extensionsUsed[e], n = i.extensionsRequired || [];
|
|
2609
2609
|
switch (t) {
|
|
2610
|
-
case
|
|
2611
|
-
a[t] = new
|
|
2610
|
+
case $.KHR_MATERIALS_UNLIT:
|
|
2611
|
+
a[t] = new Kr();
|
|
2612
2612
|
break;
|
|
2613
|
-
case
|
|
2614
|
-
a[t] = new
|
|
2613
|
+
case $.KHR_DRACO_MESH_COMPRESSION:
|
|
2614
|
+
a[t] = new pi(i, this.dracoLoader);
|
|
2615
2615
|
break;
|
|
2616
|
-
case
|
|
2617
|
-
a[t] = new
|
|
2616
|
+
case $.KHR_TEXTURE_TRANSFORM:
|
|
2617
|
+
a[t] = new mi();
|
|
2618
2618
|
break;
|
|
2619
|
-
case
|
|
2620
|
-
a[t] = new
|
|
2619
|
+
case $.KHR_MESH_QUANTIZATION:
|
|
2620
|
+
a[t] = new hi();
|
|
2621
2621
|
break;
|
|
2622
2622
|
default: n.indexOf(t) >= 0 && o[t] === void 0 && console.warn("THREE.GLTFLoader: Unknown extension \"" + t + "\".");
|
|
2623
2623
|
}
|
|
@@ -2631,7 +2631,7 @@ var Ur = /* @__PURE__ */ Vt({ GLTFLoader: () => Wr }), Wr = class extends Je {
|
|
|
2631
2631
|
});
|
|
2632
2632
|
}
|
|
2633
2633
|
};
|
|
2634
|
-
function
|
|
2634
|
+
function Wr() {
|
|
2635
2635
|
let e = {};
|
|
2636
2636
|
return {
|
|
2637
2637
|
get: function(t) {
|
|
@@ -2648,11 +2648,11 @@ function Gr() {
|
|
|
2648
2648
|
}
|
|
2649
2649
|
};
|
|
2650
2650
|
}
|
|
2651
|
-
function
|
|
2651
|
+
function Q(e, t, n) {
|
|
2652
2652
|
let r = e.json.materials[t];
|
|
2653
2653
|
return r.extensions && r.extensions[n] ? r.extensions[n] : null;
|
|
2654
2654
|
}
|
|
2655
|
-
var
|
|
2655
|
+
var $ = {
|
|
2656
2656
|
KHR_BINARY_GLTF: "KHR_binary_glTF",
|
|
2657
2657
|
KHR_DRACO_MESH_COMPRESSION: "KHR_draco_mesh_compression",
|
|
2658
2658
|
KHR_LIGHTS_PUNCTUAL: "KHR_lights_punctual",
|
|
@@ -2676,9 +2676,9 @@ var Q = {
|
|
|
2676
2676
|
EXT_MESHOPT_COMPRESSION: "EXT_meshopt_compression",
|
|
2677
2677
|
KHR_MESHOPT_COMPRESSION: "KHR_meshopt_compression",
|
|
2678
2678
|
EXT_MESH_GPU_INSTANCING: "EXT_mesh_gpu_instancing"
|
|
2679
|
-
},
|
|
2679
|
+
}, Gr = class {
|
|
2680
2680
|
constructor(e) {
|
|
2681
|
-
this.parser = e, this.name =
|
|
2681
|
+
this.parser = e, this.name = $.KHR_LIGHTS_PUNCTUAL, this.cache = {
|
|
2682
2682
|
refs: {},
|
|
2683
2683
|
uses: {}
|
|
2684
2684
|
};
|
|
@@ -2693,18 +2693,18 @@ var Q = {
|
|
|
2693
2693
|
_loadLight(e) {
|
|
2694
2694
|
let t = this.parser, n = "light:" + e, r = t.cache.get(n);
|
|
2695
2695
|
if (r) return r;
|
|
2696
|
-
let i = t.json, a = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e], o, s = new
|
|
2697
|
-
a.color !== void 0 && s.setRGB(a.color[0], a.color[1], a.color[2],
|
|
2696
|
+
let i = t.json, a = ((i.extensions && i.extensions[this.name] || {}).lights || [])[e], o, s = new xe(16777215);
|
|
2697
|
+
a.color !== void 0 && s.setRGB(a.color[0], a.color[1], a.color[2], Ge);
|
|
2698
2698
|
let c = a.range === void 0 ? 0 : a.range;
|
|
2699
2699
|
switch (a.type) {
|
|
2700
2700
|
case "directional":
|
|
2701
|
-
o = new
|
|
2701
|
+
o = new we(s), o.target.position.set(0, 0, -1), o.add(o.target);
|
|
2702
2702
|
break;
|
|
2703
2703
|
case "point":
|
|
2704
|
-
o = new
|
|
2704
|
+
o = new pt(s), o.distance = c;
|
|
2705
2705
|
break;
|
|
2706
2706
|
case "spot":
|
|
2707
|
-
o = new
|
|
2707
|
+
o = new Dt(s), o.distance = c, a.spot = a.spot || {}, a.spot.innerConeAngle = a.spot.innerConeAngle === void 0 ? 0 : a.spot.innerConeAngle, a.spot.outerConeAngle = a.spot.outerConeAngle === void 0 ? Math.PI / 4 : a.spot.outerConeAngle, o.angle = a.spot.outerConeAngle, o.penumbra = 1 - a.spot.innerConeAngle / a.spot.outerConeAngle, o.target.position.set(0, 0, -1), o.add(o.target);
|
|
2708
2708
|
break;
|
|
2709
2709
|
default: throw Error("THREE.GLTFLoader: Unexpected light type: " + a.type);
|
|
2710
2710
|
}
|
|
@@ -2719,114 +2719,114 @@ var Q = {
|
|
|
2719
2719
|
return n._getNodeRef(t.cache, i, e);
|
|
2720
2720
|
});
|
|
2721
2721
|
}
|
|
2722
|
-
},
|
|
2722
|
+
}, Kr = class {
|
|
2723
2723
|
constructor() {
|
|
2724
|
-
this.name =
|
|
2724
|
+
this.name = $.KHR_MATERIALS_UNLIT;
|
|
2725
2725
|
}
|
|
2726
2726
|
getMaterialType() {
|
|
2727
|
-
return
|
|
2727
|
+
return Qe;
|
|
2728
2728
|
}
|
|
2729
2729
|
extendParams(e, t, n) {
|
|
2730
2730
|
let r = [];
|
|
2731
|
-
e.color = new
|
|
2731
|
+
e.color = new xe(1, 1, 1), e.opacity = 1;
|
|
2732
2732
|
let i = t.pbrMetallicRoughness;
|
|
2733
2733
|
if (i) {
|
|
2734
2734
|
if (Array.isArray(i.baseColorFactor)) {
|
|
2735
2735
|
let t = i.baseColorFactor;
|
|
2736
|
-
e.color.setRGB(t[0], t[1], t[2],
|
|
2736
|
+
e.color.setRGB(t[0], t[1], t[2], Ge), e.opacity = t[3];
|
|
2737
2737
|
}
|
|
2738
|
-
i.baseColorTexture !== void 0 && r.push(n.assignTexture(e, "map", i.baseColorTexture,
|
|
2738
|
+
i.baseColorTexture !== void 0 && r.push(n.assignTexture(e, "map", i.baseColorTexture, xt));
|
|
2739
2739
|
}
|
|
2740
2740
|
return Promise.all(r);
|
|
2741
2741
|
}
|
|
2742
|
-
},
|
|
2742
|
+
}, qr = class {
|
|
2743
2743
|
constructor(e) {
|
|
2744
|
-
this.parser = e, this.name =
|
|
2744
|
+
this.parser = e, this.name = $.KHR_MATERIALS_EMISSIVE_STRENGTH;
|
|
2745
2745
|
}
|
|
2746
2746
|
extendMaterialParams(e, t) {
|
|
2747
|
-
let n =
|
|
2747
|
+
let n = Q(this.parser, e, this.name);
|
|
2748
2748
|
return n === null || n.emissiveStrength !== void 0 && (t.emissiveIntensity = n.emissiveStrength), Promise.resolve();
|
|
2749
2749
|
}
|
|
2750
|
-
},
|
|
2750
|
+
}, Jr = class {
|
|
2751
2751
|
constructor(e) {
|
|
2752
|
-
this.parser = e, this.name =
|
|
2752
|
+
this.parser = e, this.name = $.KHR_MATERIALS_CLEARCOAT;
|
|
2753
2753
|
}
|
|
2754
2754
|
getMaterialType(e) {
|
|
2755
|
-
return
|
|
2755
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2756
2756
|
}
|
|
2757
2757
|
extendMaterialParams(e, t) {
|
|
2758
|
-
let n =
|
|
2758
|
+
let n = Q(this.parser, e, this.name);
|
|
2759
2759
|
if (n === null) return Promise.resolve();
|
|
2760
2760
|
let r = [];
|
|
2761
2761
|
if (n.clearcoatFactor !== void 0 && (t.clearcoat = n.clearcoatFactor), n.clearcoatTexture !== void 0 && r.push(this.parser.assignTexture(t, "clearcoatMap", n.clearcoatTexture)), n.clearcoatRoughnessFactor !== void 0 && (t.clearcoatRoughness = n.clearcoatRoughnessFactor), n.clearcoatRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "clearcoatRoughnessMap", n.clearcoatRoughnessTexture)), n.clearcoatNormalTexture !== void 0 && (r.push(this.parser.assignTexture(t, "clearcoatNormalMap", n.clearcoatNormalTexture)), n.clearcoatNormalTexture.scale !== void 0)) {
|
|
2762
2762
|
let e = n.clearcoatNormalTexture.scale;
|
|
2763
|
-
t.clearcoatNormalScale = new
|
|
2763
|
+
t.clearcoatNormalScale = new G(e, e);
|
|
2764
2764
|
}
|
|
2765
2765
|
return Promise.all(r);
|
|
2766
2766
|
}
|
|
2767
|
-
},
|
|
2767
|
+
}, Yr = class {
|
|
2768
2768
|
constructor(e) {
|
|
2769
|
-
this.parser = e, this.name =
|
|
2769
|
+
this.parser = e, this.name = $.KHR_MATERIALS_DISPERSION;
|
|
2770
2770
|
}
|
|
2771
2771
|
getMaterialType(e) {
|
|
2772
|
-
return
|
|
2772
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2773
2773
|
}
|
|
2774
2774
|
extendMaterialParams(e, t) {
|
|
2775
|
-
let n =
|
|
2775
|
+
let n = Q(this.parser, e, this.name);
|
|
2776
2776
|
return n === null || (t.dispersion = n.dispersion === void 0 ? 0 : n.dispersion), Promise.resolve();
|
|
2777
2777
|
}
|
|
2778
|
-
},
|
|
2778
|
+
}, Xr = class {
|
|
2779
2779
|
constructor(e) {
|
|
2780
|
-
this.parser = e, this.name =
|
|
2780
|
+
this.parser = e, this.name = $.KHR_MATERIALS_IRIDESCENCE;
|
|
2781
2781
|
}
|
|
2782
2782
|
getMaterialType(e) {
|
|
2783
|
-
return
|
|
2783
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2784
2784
|
}
|
|
2785
2785
|
extendMaterialParams(e, t) {
|
|
2786
|
-
let n =
|
|
2786
|
+
let n = Q(this.parser, e, this.name);
|
|
2787
2787
|
if (n === null) return Promise.resolve();
|
|
2788
2788
|
let r = [];
|
|
2789
2789
|
return n.iridescenceFactor !== void 0 && (t.iridescence = n.iridescenceFactor), n.iridescenceTexture !== void 0 && r.push(this.parser.assignTexture(t, "iridescenceMap", n.iridescenceTexture)), n.iridescenceIor !== void 0 && (t.iridescenceIOR = n.iridescenceIor), t.iridescenceThicknessRange === void 0 && (t.iridescenceThicknessRange = [100, 400]), n.iridescenceThicknessMinimum !== void 0 && (t.iridescenceThicknessRange[0] = n.iridescenceThicknessMinimum), n.iridescenceThicknessMaximum !== void 0 && (t.iridescenceThicknessRange[1] = n.iridescenceThicknessMaximum), n.iridescenceThicknessTexture !== void 0 && r.push(this.parser.assignTexture(t, "iridescenceThicknessMap", n.iridescenceThicknessTexture)), Promise.all(r);
|
|
2790
2790
|
}
|
|
2791
|
-
},
|
|
2791
|
+
}, Zr = class {
|
|
2792
2792
|
constructor(e) {
|
|
2793
|
-
this.parser = e, this.name =
|
|
2793
|
+
this.parser = e, this.name = $.KHR_MATERIALS_SHEEN;
|
|
2794
2794
|
}
|
|
2795
2795
|
getMaterialType(e) {
|
|
2796
|
-
return
|
|
2796
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2797
2797
|
}
|
|
2798
2798
|
extendMaterialParams(e, t) {
|
|
2799
|
-
let n =
|
|
2799
|
+
let n = Q(this.parser, e, this.name);
|
|
2800
2800
|
if (n === null) return Promise.resolve();
|
|
2801
2801
|
let r = [];
|
|
2802
|
-
if (t.sheenColor = new
|
|
2802
|
+
if (t.sheenColor = new xe(0, 0, 0), t.sheenRoughness = 0, t.sheen = 1, n.sheenColorFactor !== void 0) {
|
|
2803
2803
|
let e = n.sheenColorFactor;
|
|
2804
|
-
t.sheenColor.setRGB(e[0], e[1], e[2],
|
|
2804
|
+
t.sheenColor.setRGB(e[0], e[1], e[2], Ge);
|
|
2805
2805
|
}
|
|
2806
|
-
return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture,
|
|
2806
|
+
return n.sheenRoughnessFactor !== void 0 && (t.sheenRoughness = n.sheenRoughnessFactor), n.sheenColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenColorMap", n.sheenColorTexture, xt)), n.sheenRoughnessTexture !== void 0 && r.push(this.parser.assignTexture(t, "sheenRoughnessMap", n.sheenRoughnessTexture)), Promise.all(r);
|
|
2807
2807
|
}
|
|
2808
|
-
},
|
|
2808
|
+
}, Qr = class {
|
|
2809
2809
|
constructor(e) {
|
|
2810
|
-
this.parser = e, this.name =
|
|
2810
|
+
this.parser = e, this.name = $.KHR_MATERIALS_TRANSMISSION;
|
|
2811
2811
|
}
|
|
2812
2812
|
getMaterialType(e) {
|
|
2813
|
-
return
|
|
2813
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2814
2814
|
}
|
|
2815
2815
|
extendMaterialParams(e, t) {
|
|
2816
|
-
let n =
|
|
2816
|
+
let n = Q(this.parser, e, this.name);
|
|
2817
2817
|
if (n === null) return Promise.resolve();
|
|
2818
2818
|
let r = [];
|
|
2819
2819
|
return n.transmissionFactor !== void 0 && (t.transmission = n.transmissionFactor), n.transmissionTexture !== void 0 && r.push(this.parser.assignTexture(t, "transmissionMap", n.transmissionTexture)), Promise.all(r);
|
|
2820
2820
|
}
|
|
2821
|
-
},
|
|
2821
|
+
}, $r = class {
|
|
2822
2822
|
constructor(e) {
|
|
2823
|
-
this.parser = e, this.name =
|
|
2823
|
+
this.parser = e, this.name = $.KHR_MATERIALS_VOLUME;
|
|
2824
2824
|
}
|
|
2825
2825
|
getMaterialType(e) {
|
|
2826
|
-
return
|
|
2826
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2827
2827
|
}
|
|
2828
2828
|
extendMaterialParams(e, t) {
|
|
2829
|
-
let n =
|
|
2829
|
+
let n = Q(this.parser, e, this.name);
|
|
2830
2830
|
if (n === null) return Promise.resolve();
|
|
2831
2831
|
let r = [];
|
|
2832
2832
|
t.thickness = n.thicknessFactor === void 0 ? 0 : n.thicknessFactor, n.thicknessTexture !== void 0 && r.push(this.parser.assignTexture(t, "thicknessMap", n.thicknessTexture)), t.attenuationDistance = n.attenuationDistance || Infinity;
|
|
@@ -2835,28 +2835,28 @@ var Q = {
|
|
|
2835
2835
|
1,
|
|
2836
2836
|
1
|
|
2837
2837
|
];
|
|
2838
|
-
return t.attenuationColor = new
|
|
2838
|
+
return t.attenuationColor = new xe().setRGB(i[0], i[1], i[2], Ge), Promise.all(r);
|
|
2839
2839
|
}
|
|
2840
|
-
},
|
|
2840
|
+
}, ei = class {
|
|
2841
2841
|
constructor(e) {
|
|
2842
|
-
this.parser = e, this.name =
|
|
2842
|
+
this.parser = e, this.name = $.KHR_MATERIALS_IOR;
|
|
2843
2843
|
}
|
|
2844
2844
|
getMaterialType(e) {
|
|
2845
|
-
return
|
|
2845
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2846
2846
|
}
|
|
2847
2847
|
extendMaterialParams(e, t) {
|
|
2848
|
-
let n =
|
|
2848
|
+
let n = Q(this.parser, e, this.name);
|
|
2849
2849
|
return n === null ? Promise.resolve() : (t.ior = n.ior === void 0 ? 1.5 : n.ior, t.ior === 0 && (t.ior = 1e3), Promise.resolve());
|
|
2850
2850
|
}
|
|
2851
|
-
},
|
|
2851
|
+
}, ti = class {
|
|
2852
2852
|
constructor(e) {
|
|
2853
|
-
this.parser = e, this.name =
|
|
2853
|
+
this.parser = e, this.name = $.KHR_MATERIALS_SPECULAR;
|
|
2854
2854
|
}
|
|
2855
2855
|
getMaterialType(e) {
|
|
2856
|
-
return
|
|
2856
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2857
2857
|
}
|
|
2858
2858
|
extendMaterialParams(e, t) {
|
|
2859
|
-
let n =
|
|
2859
|
+
let n = Q(this.parser, e, this.name);
|
|
2860
2860
|
if (n === null) return Promise.resolve();
|
|
2861
2861
|
let r = [];
|
|
2862
2862
|
t.specularIntensity = n.specularFactor === void 0 ? 1 : n.specularFactor, n.specularTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularIntensityMap", n.specularTexture));
|
|
@@ -2865,37 +2865,37 @@ var Q = {
|
|
|
2865
2865
|
1,
|
|
2866
2866
|
1
|
|
2867
2867
|
];
|
|
2868
|
-
return t.specularColor = new
|
|
2868
|
+
return t.specularColor = new xe().setRGB(i[0], i[1], i[2], Ge), n.specularColorTexture !== void 0 && r.push(this.parser.assignTexture(t, "specularColorMap", n.specularColorTexture, xt)), Promise.all(r);
|
|
2869
2869
|
}
|
|
2870
|
-
},
|
|
2870
|
+
}, ni = class {
|
|
2871
2871
|
constructor(e) {
|
|
2872
|
-
this.parser = e, this.name =
|
|
2872
|
+
this.parser = e, this.name = $.EXT_MATERIALS_BUMP;
|
|
2873
2873
|
}
|
|
2874
2874
|
getMaterialType(e) {
|
|
2875
|
-
return
|
|
2875
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2876
2876
|
}
|
|
2877
2877
|
extendMaterialParams(e, t) {
|
|
2878
|
-
let n =
|
|
2878
|
+
let n = Q(this.parser, e, this.name);
|
|
2879
2879
|
if (n === null) return Promise.resolve();
|
|
2880
2880
|
let r = [];
|
|
2881
2881
|
return t.bumpScale = n.bumpFactor === void 0 ? 1 : n.bumpFactor, n.bumpTexture !== void 0 && r.push(this.parser.assignTexture(t, "bumpMap", n.bumpTexture)), Promise.all(r);
|
|
2882
2882
|
}
|
|
2883
|
-
},
|
|
2883
|
+
}, ri = class {
|
|
2884
2884
|
constructor(e) {
|
|
2885
|
-
this.parser = e, this.name =
|
|
2885
|
+
this.parser = e, this.name = $.KHR_MATERIALS_ANISOTROPY;
|
|
2886
2886
|
}
|
|
2887
2887
|
getMaterialType(e) {
|
|
2888
|
-
return
|
|
2888
|
+
return Q(this.parser, e, this.name) === null ? null : et;
|
|
2889
2889
|
}
|
|
2890
2890
|
extendMaterialParams(e, t) {
|
|
2891
|
-
let n =
|
|
2891
|
+
let n = Q(this.parser, e, this.name);
|
|
2892
2892
|
if (n === null) return Promise.resolve();
|
|
2893
2893
|
let r = [];
|
|
2894
2894
|
return n.anisotropyStrength !== void 0 && (t.anisotropy = n.anisotropyStrength), n.anisotropyRotation !== void 0 && (t.anisotropyRotation = n.anisotropyRotation), n.anisotropyTexture !== void 0 && r.push(this.parser.assignTexture(t, "anisotropyMap", n.anisotropyTexture)), Promise.all(r);
|
|
2895
2895
|
}
|
|
2896
|
-
},
|
|
2896
|
+
}, ii = class {
|
|
2897
2897
|
constructor(e) {
|
|
2898
|
-
this.parser = e, this.name =
|
|
2898
|
+
this.parser = e, this.name = $.KHR_TEXTURE_BASISU;
|
|
2899
2899
|
}
|
|
2900
2900
|
loadTexture(e) {
|
|
2901
2901
|
let t = this.parser, n = t.json, r = n.textures[e];
|
|
@@ -2907,9 +2907,9 @@ var Q = {
|
|
|
2907
2907
|
}
|
|
2908
2908
|
return t.loadTextureImage(e, i.source, a);
|
|
2909
2909
|
}
|
|
2910
|
-
},
|
|
2910
|
+
}, ai = class {
|
|
2911
2911
|
constructor(e) {
|
|
2912
|
-
this.parser = e, this.name =
|
|
2912
|
+
this.parser = e, this.name = $.EXT_TEXTURE_WEBP;
|
|
2913
2913
|
}
|
|
2914
2914
|
loadTexture(e) {
|
|
2915
2915
|
let t = this.name, n = this.parser, r = n.json, i = r.textures[e];
|
|
@@ -2921,9 +2921,9 @@ var Q = {
|
|
|
2921
2921
|
}
|
|
2922
2922
|
return n.loadTextureImage(e, a.source, s);
|
|
2923
2923
|
}
|
|
2924
|
-
},
|
|
2924
|
+
}, oi = class {
|
|
2925
2925
|
constructor(e) {
|
|
2926
|
-
this.parser = e, this.name =
|
|
2926
|
+
this.parser = e, this.name = $.EXT_TEXTURE_AVIF;
|
|
2927
2927
|
}
|
|
2928
2928
|
loadTexture(e) {
|
|
2929
2929
|
let t = this.name, n = this.parser, r = n.json, i = r.textures[e];
|
|
@@ -2935,7 +2935,7 @@ var Q = {
|
|
|
2935
2935
|
}
|
|
2936
2936
|
return n.loadTextureImage(e, a.source, s);
|
|
2937
2937
|
}
|
|
2938
|
-
},
|
|
2938
|
+
}, si = class {
|
|
2939
2939
|
constructor(e, t) {
|
|
2940
2940
|
this.name = t, this.parser = e;
|
|
2941
2941
|
}
|
|
@@ -2958,64 +2958,64 @@ var Q = {
|
|
|
2958
2958
|
});
|
|
2959
2959
|
} else return null;
|
|
2960
2960
|
}
|
|
2961
|
-
},
|
|
2961
|
+
}, ci = class {
|
|
2962
2962
|
constructor(e) {
|
|
2963
|
-
this.name =
|
|
2963
|
+
this.name = $.EXT_MESH_GPU_INSTANCING, this.parser = e;
|
|
2964
2964
|
}
|
|
2965
2965
|
createNodeMesh(e) {
|
|
2966
2966
|
let t = this.parser.json, n = t.nodes[e];
|
|
2967
2967
|
if (!n.extensions || !n.extensions[this.name] || n.mesh === void 0) return null;
|
|
2968
2968
|
let r = t.meshes[n.mesh];
|
|
2969
|
-
for (let e of r.primitives) if (e.mode !==
|
|
2969
|
+
for (let e of r.primitives) if (e.mode !== yi.TRIANGLES && e.mode !== yi.TRIANGLE_STRIP && e.mode !== yi.TRIANGLE_FAN && e.mode !== void 0) return null;
|
|
2970
2970
|
let i = n.extensions[this.name].attributes, a = [], o = {};
|
|
2971
2971
|
for (let e in i) a.push(this.parser.getDependency("accessor", i[e]).then((t) => (o[e] = t, o[e])));
|
|
2972
2972
|
return a.length < 1 ? null : (a.push(this.parser.createNodeMesh(e)), Promise.all(a).then((e) => {
|
|
2973
2973
|
let t = e.pop(), n = t.isGroup ? t.children : [t], r = e[0].count, i = [];
|
|
2974
2974
|
for (let e of n) {
|
|
2975
|
-
let t = new
|
|
2975
|
+
let t = new Ze(), n = new K(), a = new W(), s = new K(1, 1, 1), c = new Ne(e.geometry, e.material, r);
|
|
2976
2976
|
for (let e = 0; e < r; e++) o.TRANSLATION && n.fromBufferAttribute(o.TRANSLATION, e), o.ROTATION && a.fromBufferAttribute(o.ROTATION, e), o.SCALE && s.fromBufferAttribute(o.SCALE, e), c.setMatrixAt(e, t.compose(n, a, s));
|
|
2977
2977
|
for (let t in o) if (t === "_COLOR_0") {
|
|
2978
2978
|
let e = o[t];
|
|
2979
|
-
c.instanceColor = new
|
|
2979
|
+
c.instanceColor = new Me(e.array, e.itemSize, e.normalized);
|
|
2980
2980
|
} else t !== "TRANSLATION" && t !== "ROTATION" && t !== "SCALE" && e.geometry.setAttribute(t, o[t]);
|
|
2981
|
-
|
|
2981
|
+
st.prototype.copy.call(c, e), this.parser.assignFinalMaterial(c), i.push(c);
|
|
2982
2982
|
}
|
|
2983
2983
|
return t.isGroup ? (t.clear(), t.add(...i), t) : i[0];
|
|
2984
2984
|
}));
|
|
2985
2985
|
}
|
|
2986
|
-
},
|
|
2986
|
+
}, li = "glTF", ui = 12, di = {
|
|
2987
2987
|
JSON: 1313821514,
|
|
2988
2988
|
BIN: 5130562
|
|
2989
|
-
},
|
|
2989
|
+
}, fi = class {
|
|
2990
2990
|
constructor(e) {
|
|
2991
|
-
this.name =
|
|
2992
|
-
let t = new DataView(e, 0,
|
|
2991
|
+
this.name = $.KHR_BINARY_GLTF, this.content = null, this.body = null;
|
|
2992
|
+
let t = new DataView(e, 0, ui), n = new TextDecoder();
|
|
2993
2993
|
if (this.header = {
|
|
2994
2994
|
magic: n.decode(new Uint8Array(e.slice(0, 4))),
|
|
2995
2995
|
version: t.getUint32(4, !0),
|
|
2996
2996
|
length: t.getUint32(8, !0)
|
|
2997
|
-
}, this.header.magic !==
|
|
2997
|
+
}, this.header.magic !== li) throw Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");
|
|
2998
2998
|
if (this.header.version < 2) throw Error("THREE.GLTFLoader: Legacy binary file detected.");
|
|
2999
|
-
let r = this.header.length -
|
|
2999
|
+
let r = this.header.length - ui, i = new DataView(e, ui), a = 0;
|
|
3000
3000
|
for (; a < r;) {
|
|
3001
3001
|
let t = i.getUint32(a, !0);
|
|
3002
3002
|
a += 4;
|
|
3003
3003
|
let r = i.getUint32(a, !0);
|
|
3004
|
-
if (a += 4, r ===
|
|
3005
|
-
let r = new Uint8Array(e,
|
|
3004
|
+
if (a += 4, r === di.JSON) {
|
|
3005
|
+
let r = new Uint8Array(e, ui + a, t);
|
|
3006
3006
|
this.content = n.decode(r);
|
|
3007
|
-
} else if (r ===
|
|
3008
|
-
let n =
|
|
3007
|
+
} else if (r === di.BIN) {
|
|
3008
|
+
let n = ui + a;
|
|
3009
3009
|
this.body = e.slice(n, n + t);
|
|
3010
3010
|
}
|
|
3011
3011
|
a += t;
|
|
3012
3012
|
}
|
|
3013
3013
|
if (this.content === null) throw Error("THREE.GLTFLoader: JSON content not found.");
|
|
3014
3014
|
}
|
|
3015
|
-
},
|
|
3015
|
+
}, pi = class {
|
|
3016
3016
|
constructor(e, t) {
|
|
3017
3017
|
if (!t) throw Error("THREE.GLTFLoader: No DRACOLoader instance provided.");
|
|
3018
|
-
this.name =
|
|
3018
|
+
this.name = $.KHR_DRACO_MESH_COMPRESSION, this.json = e, this.dracoLoader = t, this.dracoLoader.preload();
|
|
3019
3019
|
}
|
|
3020
3020
|
decodePrimitive(e, t) {
|
|
3021
3021
|
let n = this.json, r = this.dracoLoader, i = e.extensions[this.name].bufferView, a = e.extensions[this.name].attributes, o = {}, s = {}, c = {};
|
|
@@ -3038,22 +3038,22 @@ var Q = {
|
|
|
3038
3038
|
r !== void 0 && (n.normalized = r);
|
|
3039
3039
|
}
|
|
3040
3040
|
t(e);
|
|
3041
|
-
}, o, c,
|
|
3041
|
+
}, o, c, Ge, n);
|
|
3042
3042
|
});
|
|
3043
3043
|
});
|
|
3044
3044
|
}
|
|
3045
|
-
},
|
|
3045
|
+
}, mi = class {
|
|
3046
3046
|
constructor() {
|
|
3047
|
-
this.name =
|
|
3047
|
+
this.name = $.KHR_TEXTURE_TRANSFORM;
|
|
3048
3048
|
}
|
|
3049
3049
|
extendTexture(e, t) {
|
|
3050
3050
|
return (t.texCoord === void 0 || t.texCoord === e.channel) && t.offset === void 0 && t.rotation === void 0 && t.scale === void 0 ? e : (e = e.clone(), t.texCoord !== void 0 && (e.channel = t.texCoord), t.offset !== void 0 && e.offset.fromArray(t.offset), t.rotation !== void 0 && (e.rotation = t.rotation), t.scale !== void 0 && e.repeat.fromArray(t.scale), e.needsUpdate = !0, e);
|
|
3051
3051
|
}
|
|
3052
|
-
},
|
|
3052
|
+
}, hi = class {
|
|
3053
3053
|
constructor() {
|
|
3054
|
-
this.name =
|
|
3054
|
+
this.name = $.KHR_MESH_QUANTIZATION;
|
|
3055
3055
|
}
|
|
3056
|
-
},
|
|
3056
|
+
}, gi = class extends Fe {
|
|
3057
3057
|
constructor(e, t, n, r) {
|
|
3058
3058
|
super(e, t, n, r);
|
|
3059
3059
|
}
|
|
@@ -3070,12 +3070,12 @@ var Q = {
|
|
|
3070
3070
|
}
|
|
3071
3071
|
return i;
|
|
3072
3072
|
}
|
|
3073
|
-
},
|
|
3073
|
+
}, _i = new W(), vi = class extends gi {
|
|
3074
3074
|
interpolate_(e, t, n, r) {
|
|
3075
3075
|
let i = super.interpolate_(e, t, n, r);
|
|
3076
|
-
return
|
|
3076
|
+
return _i.fromArray(i).normalize().toArray(i), i;
|
|
3077
3077
|
}
|
|
3078
|
-
},
|
|
3078
|
+
}, yi = {
|
|
3079
3079
|
FLOAT: 5126,
|
|
3080
3080
|
FLOAT_MAT3: 35675,
|
|
3081
3081
|
FLOAT_MAT4: 35676,
|
|
@@ -3102,16 +3102,16 @@ var Q = {
|
|
|
3102
3102
|
5125: Uint32Array,
|
|
3103
3103
|
5126: Float32Array
|
|
3104
3104
|
}, xi = {
|
|
3105
|
-
9728:
|
|
3106
|
-
9729:
|
|
3107
|
-
9984:
|
|
3108
|
-
9985:
|
|
3109
|
-
9986:
|
|
3110
|
-
9987:
|
|
3105
|
+
9728: rt,
|
|
3106
|
+
9729: He,
|
|
3107
|
+
9984: at,
|
|
3108
|
+
9985: We,
|
|
3109
|
+
9986: it,
|
|
3110
|
+
9987: Ue
|
|
3111
3111
|
}, Si = {
|
|
3112
|
-
33071:
|
|
3113
|
-
33648:
|
|
3114
|
-
10497:
|
|
3112
|
+
33071: be,
|
|
3113
|
+
33648: nt,
|
|
3114
|
+
10497: bt
|
|
3115
3115
|
}, Ci = {
|
|
3116
3116
|
SCALAR: 1,
|
|
3117
3117
|
VEC2: 2,
|
|
@@ -3138,22 +3138,22 @@ var Q = {
|
|
|
3138
3138
|
weights: "morphTargetInfluences"
|
|
3139
3139
|
}, Ei = {
|
|
3140
3140
|
CUBICSPLINE: void 0,
|
|
3141
|
-
LINEAR:
|
|
3142
|
-
STEP:
|
|
3141
|
+
LINEAR: Le,
|
|
3142
|
+
STEP: Ie
|
|
3143
3143
|
}, Di = {
|
|
3144
3144
|
OPAQUE: "OPAQUE",
|
|
3145
3145
|
MASK: "MASK",
|
|
3146
3146
|
BLEND: "BLEND"
|
|
3147
3147
|
};
|
|
3148
3148
|
function Oi(e) {
|
|
3149
|
-
return e.DefaultMaterial === void 0 && (e.DefaultMaterial = new
|
|
3149
|
+
return e.DefaultMaterial === void 0 && (e.DefaultMaterial = new tt({
|
|
3150
3150
|
color: 16777215,
|
|
3151
3151
|
emissive: 0,
|
|
3152
3152
|
metalness: 1,
|
|
3153
3153
|
roughness: 1,
|
|
3154
3154
|
transparent: !1,
|
|
3155
3155
|
depthTest: !0,
|
|
3156
|
-
side:
|
|
3156
|
+
side: ke
|
|
3157
3157
|
})), e.DefaultMaterial;
|
|
3158
3158
|
}
|
|
3159
3159
|
function ki(e, t, n) {
|
|
@@ -3205,7 +3205,7 @@ function Mi(e, t) {
|
|
|
3205
3205
|
}
|
|
3206
3206
|
}
|
|
3207
3207
|
function Ni(e) {
|
|
3208
|
-
let t, n = e.extensions && e.extensions[
|
|
3208
|
+
let t, n = e.extensions && e.extensions[$.KHR_DRACO_MESH_COMPRESSION];
|
|
3209
3209
|
if (t = n ? "draco:" + n.bufferView + ":" + n.indices + ":" + Pi(n.attributes) : e.indices + ":" + Pi(e.attributes) + ":" + e.mode, e.targets !== void 0) for (let n = 0, r = e.targets.length; n < r; n++) t += ":" + Pi(e.targets[n]);
|
|
3210
3210
|
return t;
|
|
3211
3211
|
}
|
|
@@ -3226,9 +3226,9 @@ function Fi(e) {
|
|
|
3226
3226
|
function Ii(e) {
|
|
3227
3227
|
return e.search(/\.jpe?g($|\?)/i) > 0 || e.search(/^data\:image\/jpeg/) === 0 ? "image/jpeg" : e.search(/\.webp($|\?)/i) > 0 || e.search(/^data\:image\/webp/) === 0 ? "image/webp" : e.search(/\.ktx2($|\?)/i) > 0 || e.search(/^data\:image\/ktx2/) === 0 ? "image/ktx2" : "image/png";
|
|
3228
3228
|
}
|
|
3229
|
-
var Li = new
|
|
3229
|
+
var Li = new Ze(), Ri = class {
|
|
3230
3230
|
constructor(e = {}, t = {}) {
|
|
3231
|
-
this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new
|
|
3231
|
+
this.json = e, this.extensions = {}, this.plugins = {}, this.options = t, this.cache = new Wr(), this.associations = /* @__PURE__ */ new Map(), this.primitiveCache = {}, this.nodeCache = {}, this.meshCache = {
|
|
3232
3232
|
refs: {},
|
|
3233
3233
|
uses: {}
|
|
3234
3234
|
}, this.cameraCache = {
|
|
@@ -3245,7 +3245,7 @@ var Li = new $e(), Ri = class {
|
|
|
3245
3245
|
let t = e.match(/Version\/(\d+)/);
|
|
3246
3246
|
r = n && t ? parseInt(t[1], 10) : -1, i = e.indexOf("Firefox") > -1, a = i ? e.match(/Firefox\/([0-9]+)\./)[1] : -1;
|
|
3247
3247
|
}
|
|
3248
|
-
typeof createImageBitmap > "u" || n && r < 17 || i && a < 98 ? this.textureLoader = new
|
|
3248
|
+
typeof createImageBitmap > "u" || n && r < 17 || i && a < 98 ? this.textureLoader = new At(this.options.manager) : this.textureLoader = new je(this.options.manager), this.textureLoader.setCrossOrigin(this.options.crossOrigin), this.textureLoader.setRequestHeader(this.options.requestHeader), this.fileLoader = new De(this.options.manager), this.fileLoader.setResponseType("arraybuffer"), this.options.crossOrigin === "use-credentials" && this.fileLoader.setWithCredentials(!0);
|
|
3249
3249
|
}
|
|
3250
3250
|
setExtensions(e) {
|
|
3251
3251
|
this.extensions = e;
|
|
@@ -3397,10 +3397,10 @@ var Li = new $e(), Ri = class {
|
|
|
3397
3397
|
loadBuffer(e) {
|
|
3398
3398
|
let t = this.json.buffers[e], n = this.fileLoader;
|
|
3399
3399
|
if (t.type && t.type !== "arraybuffer") throw Error("THREE.GLTFLoader: " + t.type + " buffer type is not supported.");
|
|
3400
|
-
if (t.uri === void 0 && e === 0) return Promise.resolve(this.extensions[
|
|
3400
|
+
if (t.uri === void 0 && e === 0) return Promise.resolve(this.extensions[$.KHR_BINARY_GLTF].body);
|
|
3401
3401
|
let r = this.options;
|
|
3402
3402
|
return new Promise(function(e, i) {
|
|
3403
|
-
n.load(
|
|
3403
|
+
n.load(qe.resolveURL(t.uri, r.path), e, void 0, function() {
|
|
3404
3404
|
i(/* @__PURE__ */ Error("THREE.GLTFLoader: Failed to load buffer \"" + t.uri + "\"."));
|
|
3405
3405
|
});
|
|
3406
3406
|
});
|
|
@@ -3416,18 +3416,18 @@ var Li = new $e(), Ri = class {
|
|
|
3416
3416
|
let t = this, n = this.json, r = this.json.accessors[e];
|
|
3417
3417
|
if (r.bufferView === void 0 && r.sparse === void 0) {
|
|
3418
3418
|
let e = Ci[r.type], t = bi[r.componentType], n = r.normalized === !0, i = new t(r.count * e);
|
|
3419
|
-
return Promise.resolve(new
|
|
3419
|
+
return Promise.resolve(new ve(i, e, n));
|
|
3420
3420
|
}
|
|
3421
3421
|
let i = [];
|
|
3422
3422
|
return r.bufferView === void 0 ? i.push(null) : i.push(this.getDependency("bufferView", r.bufferView)), r.sparse !== void 0 && (i.push(this.getDependency("bufferView", r.sparse.indices.bufferView)), i.push(this.getDependency("bufferView", r.sparse.values.bufferView))), Promise.all(i).then(function(e) {
|
|
3423
3423
|
let i = e[0], a = Ci[r.type], o = bi[r.componentType], s = o.BYTES_PER_ELEMENT, c = s * a, l = r.byteOffset || 0, u = r.bufferView === void 0 ? void 0 : n.bufferViews[r.bufferView].byteStride, d = r.normalized === !0, f, p;
|
|
3424
3424
|
if (u && u !== c) {
|
|
3425
3425
|
let e = Math.floor(l / u), n = "InterleavedBuffer:" + r.bufferView + ":" + r.componentType + ":" + e + ":" + r.count, c = t.cache.get(n);
|
|
3426
|
-
c || (f = new o(i, e * u, r.count * u / s), c = new
|
|
3427
|
-
} else f = i === null ? new o(r.count * a) : new o(i, l, r.count * a), p = new
|
|
3426
|
+
c || (f = new o(i, e * u, r.count * u / s), c = new H(f, u / s), t.cache.add(n, c)), p = new Pe(c, a, l % u / s, d);
|
|
3427
|
+
} else f = i === null ? new o(r.count * a) : new o(i, l, r.count * a), p = new ve(f, a, d);
|
|
3428
3428
|
if (r.sparse !== void 0) {
|
|
3429
3429
|
let t = Ci.SCALAR, n = bi[r.sparse.indices.componentType], s = r.sparse.indices.byteOffset || 0, c = r.sparse.values.byteOffset || 0, l = new n(e[1], s, r.sparse.count * t), u = new o(e[2], c, r.sparse.count * a);
|
|
3430
|
-
i !== null && (p = new
|
|
3430
|
+
i !== null && (p = new ve(p.array.slice(), p.itemSize, p.normalized)), p.normalized = !1;
|
|
3431
3431
|
for (let e = 0, t = l.length; e < t; e++) {
|
|
3432
3432
|
let t = l[e];
|
|
3433
3433
|
if (p.setX(t, u[e * a]), a >= 2 && p.setY(t, u[e * a + 1]), a >= 3 && p.setZ(t, u[e * a + 2]), a >= 4 && p.setW(t, u[e * a + 3]), a >= 5) throw Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.");
|
|
@@ -3451,7 +3451,7 @@ var Li = new $e(), Ri = class {
|
|
|
3451
3451
|
let c = this.loadImageSource(t, n).then(function(t) {
|
|
3452
3452
|
t.flipY = !1, t.name = a.name || o.name || "", t.name === "" && typeof o.uri == "string" && o.uri.startsWith("data:image/") === !1 && (t.name = o.uri);
|
|
3453
3453
|
let n = (i.samplers || {})[a.sampler] || {};
|
|
3454
|
-
return t.magFilter = xi[n.magFilter] ||
|
|
3454
|
+
return t.magFilter = xi[n.magFilter] || He, t.minFilter = xi[n.minFilter] || Ue, t.wrapS = Si[n.wrapS] || bt, t.wrapT = Si[n.wrapT] || bt, t.generateMipmaps = !t.isCompressedTexture && t.minFilter !== rt && t.minFilter !== He, r.associations.set(t, { textures: e }), t;
|
|
3455
3455
|
}).catch(function() {
|
|
3456
3456
|
return null;
|
|
3457
3457
|
});
|
|
@@ -3471,9 +3471,9 @@ var Li = new $e(), Ri = class {
|
|
|
3471
3471
|
return new Promise(function(n, r) {
|
|
3472
3472
|
let a = n;
|
|
3473
3473
|
t.isImageBitmapLoader === !0 && (a = function(e) {
|
|
3474
|
-
let t = new
|
|
3474
|
+
let t = new kt(e);
|
|
3475
3475
|
t.needsUpdate = !0, n(t);
|
|
3476
|
-
}), t.load(
|
|
3476
|
+
}), t.load(qe.resolveURL(e, i.path), a, void 0, r);
|
|
3477
3477
|
});
|
|
3478
3478
|
}).then(function(e) {
|
|
3479
3479
|
return c === !0 && o.revokeObjectURL(s), Ai(e, a), e.userData.mimeType = a.mimeType || Ii(a.uri), e;
|
|
@@ -3486,11 +3486,11 @@ var Li = new $e(), Ri = class {
|
|
|
3486
3486
|
let i = this;
|
|
3487
3487
|
return this.getDependency("texture", n.index).then(function(a) {
|
|
3488
3488
|
if (!a) return null;
|
|
3489
|
-
if (n.texCoord !== void 0 && n.texCoord > 0 && (a = a.clone(), a.channel = n.texCoord), i.extensions[
|
|
3490
|
-
let e = n.extensions === void 0 ? void 0 : n.extensions[
|
|
3489
|
+
if (n.texCoord !== void 0 && n.texCoord > 0 && (a = a.clone(), a.channel = n.texCoord), i.extensions[$.KHR_TEXTURE_TRANSFORM]) {
|
|
3490
|
+
let e = n.extensions === void 0 ? void 0 : n.extensions[$.KHR_TEXTURE_TRANSFORM];
|
|
3491
3491
|
if (e) {
|
|
3492
3492
|
let t = i.associations.get(a);
|
|
3493
|
-
a = i.extensions[
|
|
3493
|
+
a = i.extensions[$.KHR_TEXTURE_TRANSFORM].extendTexture(a, e), i.associations.set(a, t);
|
|
3494
3494
|
}
|
|
3495
3495
|
}
|
|
3496
3496
|
return r !== void 0 && (a.colorSpace = r), e[t] = a, a;
|
|
@@ -3500,10 +3500,10 @@ var Li = new $e(), Ri = class {
|
|
|
3500
3500
|
let t = e.geometry, n = e.material, r = t.attributes.tangent === void 0, i = t.attributes.color !== void 0, a = t.attributes.normal === void 0;
|
|
3501
3501
|
if (e.isPoints) {
|
|
3502
3502
|
let e = "PointsMaterial:" + n.uuid, t = this.cache.get(e);
|
|
3503
|
-
t || (t = new
|
|
3503
|
+
t || (t = new ht(), Ye.prototype.copy.call(t, n), t.color.copy(n.color), t.map = n.map, t.sizeAttenuation = !1, this.cache.add(e, t)), n = t;
|
|
3504
3504
|
} else if (e.isLine) {
|
|
3505
3505
|
let e = "LineBasicMaterial:" + n.uuid, t = this.cache.get(e);
|
|
3506
|
-
t || (t = new
|
|
3506
|
+
t || (t = new ze(), Ye.prototype.copy.call(t, n), t.color.copy(n.color), t.map = n.map, this.cache.add(e, t)), n = t;
|
|
3507
3507
|
}
|
|
3508
3508
|
if (r || i || a) {
|
|
3509
3509
|
let e = "ClonedMaterial:" + n.uuid + ":";
|
|
@@ -3514,48 +3514,48 @@ var Li = new $e(), Ri = class {
|
|
|
3514
3514
|
e.material = n;
|
|
3515
3515
|
}
|
|
3516
3516
|
getMaterialType() {
|
|
3517
|
-
return
|
|
3517
|
+
return tt;
|
|
3518
3518
|
}
|
|
3519
3519
|
loadMaterial(e) {
|
|
3520
3520
|
let t = this, n = this.json, r = this.extensions, i = n.materials[e], a, o = {}, s = i.extensions || {}, c = [];
|
|
3521
|
-
if (s[
|
|
3522
|
-
let e = r[
|
|
3521
|
+
if (s[$.KHR_MATERIALS_UNLIT]) {
|
|
3522
|
+
let e = r[$.KHR_MATERIALS_UNLIT];
|
|
3523
3523
|
a = e.getMaterialType(), c.push(e.extendParams(o, i, t));
|
|
3524
3524
|
} else {
|
|
3525
3525
|
let n = i.pbrMetallicRoughness || {};
|
|
3526
|
-
if (o.color = new
|
|
3526
|
+
if (o.color = new xe(1, 1, 1), o.opacity = 1, Array.isArray(n.baseColorFactor)) {
|
|
3527
3527
|
let e = n.baseColorFactor;
|
|
3528
|
-
o.color.setRGB(e[0], e[1], e[2],
|
|
3528
|
+
o.color.setRGB(e[0], e[1], e[2], Ge), o.opacity = e[3];
|
|
3529
3529
|
}
|
|
3530
|
-
n.baseColorTexture !== void 0 && c.push(t.assignTexture(o, "map", n.baseColorTexture,
|
|
3530
|
+
n.baseColorTexture !== void 0 && c.push(t.assignTexture(o, "map", n.baseColorTexture, xt)), o.metalness = n.metallicFactor === void 0 ? 1 : n.metallicFactor, o.roughness = n.roughnessFactor === void 0 ? 1 : n.roughnessFactor, n.metallicRoughnessTexture !== void 0 && (c.push(t.assignTexture(o, "metalnessMap", n.metallicRoughnessTexture)), c.push(t.assignTexture(o, "roughnessMap", n.metallicRoughnessTexture))), a = this._invokeOne(function(t) {
|
|
3531
3531
|
return t.getMaterialType && t.getMaterialType(e);
|
|
3532
3532
|
}), c.push(Promise.all(this._invokeAll(function(t) {
|
|
3533
3533
|
return t.extendMaterialParams && t.extendMaterialParams(e, o);
|
|
3534
3534
|
})));
|
|
3535
3535
|
}
|
|
3536
|
-
i.doubleSided === !0 && (o.side =
|
|
3536
|
+
i.doubleSided === !0 && (o.side = Te);
|
|
3537
3537
|
let l = i.alphaMode || Di.OPAQUE;
|
|
3538
|
-
if (l === Di.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, l === Di.MASK && (o.alphaTest = i.alphaCutoff === void 0 ? .5 : i.alphaCutoff)), i.normalTexture !== void 0 && a !==
|
|
3538
|
+
if (l === Di.BLEND ? (o.transparent = !0, o.depthWrite = !1) : (o.transparent = !1, l === Di.MASK && (o.alphaTest = i.alphaCutoff === void 0 ? .5 : i.alphaCutoff)), i.normalTexture !== void 0 && a !== Qe && (c.push(t.assignTexture(o, "normalMap", i.normalTexture)), o.normalScale = new G(1, 1), i.normalTexture.scale !== void 0)) {
|
|
3539
3539
|
let e = i.normalTexture.scale;
|
|
3540
3540
|
o.normalScale.set(e, e);
|
|
3541
3541
|
}
|
|
3542
|
-
if (i.occlusionTexture !== void 0 && a !==
|
|
3542
|
+
if (i.occlusionTexture !== void 0 && a !== Qe && (c.push(t.assignTexture(o, "aoMap", i.occlusionTexture)), i.occlusionTexture.strength !== void 0 && (o.aoMapIntensity = i.occlusionTexture.strength)), i.emissiveFactor !== void 0 && a !== Qe) {
|
|
3543
3543
|
let e = i.emissiveFactor;
|
|
3544
|
-
o.emissive = new
|
|
3544
|
+
o.emissive = new xe().setRGB(e[0], e[1], e[2], Ge);
|
|
3545
3545
|
}
|
|
3546
|
-
return i.emissiveTexture !== void 0 && a !==
|
|
3546
|
+
return i.emissiveTexture !== void 0 && a !== Qe && c.push(t.assignTexture(o, "emissiveMap", i.emissiveTexture, xt)), Promise.all(c).then(function() {
|
|
3547
3547
|
let n = new a(o);
|
|
3548
3548
|
return i.name && (n.name = i.name), Ai(n, i), t.associations.set(n, { materials: e }), i.extensions && ki(r, n, i), n;
|
|
3549
3549
|
});
|
|
3550
3550
|
}
|
|
3551
3551
|
createUniqueName(e) {
|
|
3552
|
-
let t =
|
|
3552
|
+
let t = gt.sanitizeNodeName(e || "");
|
|
3553
3553
|
return t in this.nodeNamesUsed ? t + "_" + ++this.nodeNamesUsed[t] : (this.nodeNamesUsed[t] = 0, t);
|
|
3554
3554
|
}
|
|
3555
3555
|
loadGeometries(e) {
|
|
3556
3556
|
let t = this, n = this.extensions, r = this.primitiveCache;
|
|
3557
3557
|
function i(e) {
|
|
3558
|
-
return n[
|
|
3558
|
+
return n[$.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e, t).then(function(n) {
|
|
3559
3559
|
return Bi(n, e, t);
|
|
3560
3560
|
});
|
|
3561
3561
|
}
|
|
@@ -3565,7 +3565,7 @@ var Li = new $e(), Ri = class {
|
|
|
3565
3565
|
if (c) a.push(c.promise);
|
|
3566
3566
|
else {
|
|
3567
3567
|
let e;
|
|
3568
|
-
e = o.extensions && o.extensions[
|
|
3568
|
+
e = o.extensions && o.extensions[$.KHR_DRACO_MESH_COMPRESSION] ? i(o) : Bi(new ye(), o, t), r[s] = {
|
|
3569
3569
|
primitive: o,
|
|
3570
3570
|
promise: e
|
|
3571
3571
|
}, a.push(e);
|
|
@@ -3583,11 +3583,11 @@ var Li = new $e(), Ri = class {
|
|
|
3583
3583
|
let o = n.slice(0, n.length - 1), s = n[n.length - 1], c = [];
|
|
3584
3584
|
for (let n = 0, l = s.length; n < l; n++) {
|
|
3585
3585
|
let l = s[n], u = a[n], d, f = o[n];
|
|
3586
|
-
if (u.mode ===
|
|
3587
|
-
else if (u.mode ===
|
|
3588
|
-
else if (u.mode ===
|
|
3589
|
-
else if (u.mode ===
|
|
3590
|
-
else if (u.mode ===
|
|
3586
|
+
if (u.mode === yi.TRIANGLES || u.mode === yi.TRIANGLE_STRIP || u.mode === yi.TRIANGLE_FAN || u.mode === void 0) d = i.isSkinnedMesh === !0 ? new Ct(l, f) : new U(l, f), d.isSkinnedMesh === !0 && d.normalizeSkinWeights(), u.mode === yi.TRIANGLE_STRIP ? d.geometry = zr(d.geometry, Nt) : u.mode === yi.TRIANGLE_FAN && (d.geometry = zr(d.geometry, Mt));
|
|
3587
|
+
else if (u.mode === yi.LINES) d = new Ve(l, f);
|
|
3588
|
+
else if (u.mode === yi.LINE_STRIP) d = new Re(l, f);
|
|
3589
|
+
else if (u.mode === yi.LINE_LOOP) d = new Be(l, f);
|
|
3590
|
+
else if (u.mode === yi.POINTS) d = new mt(l, f);
|
|
3591
3591
|
else throw Error("THREE.GLTFLoader: Primitive mode unsupported: " + u.mode);
|
|
3592
3592
|
Object.keys(d.geometry.morphAttributes).length > 0 && Mi(d, i), d.name = t.createUniqueName(i.name || "mesh_" + e), Ai(d, i), u.extensions && ki(r, d, u), t.assignFinalMaterial(d), c.push(d);
|
|
3593
3593
|
}
|
|
@@ -3596,7 +3596,7 @@ var Li = new $e(), Ri = class {
|
|
|
3596
3596
|
primitives: n
|
|
3597
3597
|
});
|
|
3598
3598
|
if (c.length === 1) return i.extensions && ki(r, c[0], i), c[0];
|
|
3599
|
-
let l = new
|
|
3599
|
+
let l = new Ae();
|
|
3600
3600
|
i.extensions && ki(r, l, i), t.associations.set(l, { meshes: e });
|
|
3601
3601
|
for (let e = 0, t = c.length; e < t; e++) l.add(c[e]);
|
|
3602
3602
|
return l;
|
|
@@ -3608,7 +3608,7 @@ var Li = new $e(), Ri = class {
|
|
|
3608
3608
|
console.warn("THREE.GLTFLoader: Missing camera parameters.");
|
|
3609
3609
|
return;
|
|
3610
3610
|
}
|
|
3611
|
-
return n.type === "perspective" ? t = new
|
|
3611
|
+
return n.type === "perspective" ? t = new ut(Xe.radToDeg(r.yfov), r.aspectRatio || 1, r.znear || 1, r.zfar || 2e6) : n.type === "orthographic" && (t = new lt(-r.xmag, r.xmag, r.ymag, -r.ymag, r.znear, r.zfar)), n.name && (t.name = this.createUniqueName(n.name)), Ai(t, n), Promise.resolve(t);
|
|
3612
3612
|
}
|
|
3613
3613
|
loadSkin(e) {
|
|
3614
3614
|
let t = this.json.skins[e], n = [];
|
|
@@ -3619,11 +3619,11 @@ var Li = new $e(), Ri = class {
|
|
|
3619
3619
|
let o = r[e];
|
|
3620
3620
|
if (o) {
|
|
3621
3621
|
i.push(o);
|
|
3622
|
-
let t = new
|
|
3622
|
+
let t = new Ze();
|
|
3623
3623
|
n !== null && t.fromArray(n.array, e * 16), a.push(t);
|
|
3624
3624
|
} else console.warn("THREE.GLTFLoader: Joint \"%s\" could not be found.", t.joints[e]);
|
|
3625
3625
|
}
|
|
3626
|
-
return new
|
|
3626
|
+
return new St(i, a);
|
|
3627
3627
|
});
|
|
3628
3628
|
}
|
|
3629
3629
|
loadAnimation(e) {
|
|
@@ -3647,7 +3647,7 @@ var Li = new $e(), Ri = class {
|
|
|
3647
3647
|
let p = n._createAnimationTracks(r, i, u, d, f);
|
|
3648
3648
|
if (p) for (let e = 0; e < p.length; e++) l.push(p[e]);
|
|
3649
3649
|
}
|
|
3650
|
-
let u = new
|
|
3650
|
+
let u = new he(i, void 0, l);
|
|
3651
3651
|
return Ai(u, r), u;
|
|
3652
3652
|
});
|
|
3653
3653
|
}
|
|
@@ -3676,7 +3676,7 @@ var Li = new $e(), Ri = class {
|
|
|
3676
3676
|
for (let e = 0, r = n.length; e < r; e++) t.add(n[e]);
|
|
3677
3677
|
if (t.userData.pivot !== void 0 && n.length > 0) {
|
|
3678
3678
|
let e = t.userData.pivot, r = n[0];
|
|
3679
|
-
t.pivot = new
|
|
3679
|
+
t.pivot = new K().fromArray(e), t.position.x -= e[0], t.position.y -= e[1], t.position.z -= e[2], r.position.set(0, 0, 0), delete t.userData.pivot;
|
|
3680
3680
|
}
|
|
3681
3681
|
return t;
|
|
3682
3682
|
});
|
|
@@ -3695,9 +3695,9 @@ var Li = new $e(), Ri = class {
|
|
|
3695
3695
|
o.push(e);
|
|
3696
3696
|
}), this.nodeCache[e] = Promise.all(o).then(function(t) {
|
|
3697
3697
|
let o;
|
|
3698
|
-
if (o = i.isBone === !0 ? new
|
|
3698
|
+
if (o = i.isBone === !0 ? new ge() : t.length > 1 ? new Ae() : t.length === 1 ? t[0] : new st(), o !== t[0]) for (let e = 0, n = t.length; e < n; e++) o.add(t[e]);
|
|
3699
3699
|
if (i.name && (o.userData.name = i.name, o.name = a), Ai(o, i), i.extensions && ki(n, o, i), i.matrix !== void 0) {
|
|
3700
|
-
let e = new
|
|
3700
|
+
let e = new Ze();
|
|
3701
3701
|
e.fromArray(i.matrix), o.applyMatrix4(e);
|
|
3702
3702
|
} else i.translation !== void 0 && o.position.fromArray(i.translation), i.rotation !== void 0 && o.quaternion.fromArray(i.rotation), i.scale !== void 0 && o.scale.fromArray(i.scale);
|
|
3703
3703
|
if (!r.associations.has(o)) r.associations.set(o, {});
|
|
@@ -3709,18 +3709,18 @@ var Li = new $e(), Ri = class {
|
|
|
3709
3709
|
}), this.nodeCache[e];
|
|
3710
3710
|
}
|
|
3711
3711
|
loadScene(e) {
|
|
3712
|
-
let t = this.extensions, n = this.json.scenes[e], r = this, i = new
|
|
3712
|
+
let t = this.extensions, n = this.json.scenes[e], r = this, i = new Ae();
|
|
3713
3713
|
n.name && (i.name = r.createUniqueName(n.name)), Ai(i, n), n.extensions && ki(t, i, n);
|
|
3714
3714
|
let a = n.nodes || [], o = [];
|
|
3715
3715
|
for (let e = 0, t = a.length; e < t; e++) o.push(r.getDependency("node", a[e]));
|
|
3716
3716
|
return Promise.all(o).then(function(e) {
|
|
3717
3717
|
for (let t = 0, n = e.length; t < n; t++) {
|
|
3718
3718
|
let n = e[t];
|
|
3719
|
-
n.parent === null ? i.add(n) : i.add(
|
|
3719
|
+
n.parent === null ? i.add(n) : i.add(Br(n));
|
|
3720
3720
|
}
|
|
3721
3721
|
return r.associations = ((e) => {
|
|
3722
3722
|
let t = /* @__PURE__ */ new Map();
|
|
3723
|
-
for (let [e, n] of r.associations) (e instanceof
|
|
3723
|
+
for (let [e, n] of r.associations) (e instanceof Ye || e instanceof kt) && t.set(e, n);
|
|
3724
3724
|
return e.traverse((e) => {
|
|
3725
3725
|
let n = r.associations.get(e);
|
|
3726
3726
|
n != null && t.set(e, n);
|
|
@@ -3737,27 +3737,27 @@ var Li = new $e(), Ri = class {
|
|
|
3737
3737
|
let l;
|
|
3738
3738
|
switch (Ti[i.path]) {
|
|
3739
3739
|
case Ti.weights:
|
|
3740
|
-
l =
|
|
3740
|
+
l = ot;
|
|
3741
3741
|
break;
|
|
3742
3742
|
case Ti.rotation:
|
|
3743
|
-
l =
|
|
3743
|
+
l = _t;
|
|
3744
3744
|
break;
|
|
3745
3745
|
case Ti.translation:
|
|
3746
3746
|
case Ti.scale:
|
|
3747
|
-
l =
|
|
3747
|
+
l = Ft;
|
|
3748
3748
|
break;
|
|
3749
3749
|
default:
|
|
3750
3750
|
switch (n.itemSize) {
|
|
3751
3751
|
case 1:
|
|
3752
|
-
l =
|
|
3752
|
+
l = ot;
|
|
3753
3753
|
break;
|
|
3754
3754
|
default:
|
|
3755
|
-
l =
|
|
3755
|
+
l = Ft;
|
|
3756
3756
|
break;
|
|
3757
3757
|
}
|
|
3758
3758
|
break;
|
|
3759
3759
|
}
|
|
3760
|
-
let u = r.interpolation === void 0 ?
|
|
3760
|
+
let u = r.interpolation === void 0 ? Le : Ei[r.interpolation], d = this._getArrayFromAccessor(n);
|
|
3761
3761
|
for (let e = 0, n = s.length; e < n; e++) {
|
|
3762
3762
|
let n = new l(s[e] + "." + Ti[i.path], t.array, d, u);
|
|
3763
3763
|
r.interpolation === "CUBICSPLINE" && this._createCubicSplineTrackInterpolant(n), a.push(n);
|
|
@@ -3775,16 +3775,16 @@ var Li = new $e(), Ri = class {
|
|
|
3775
3775
|
}
|
|
3776
3776
|
_createCubicSplineTrackInterpolant(e) {
|
|
3777
3777
|
e.createInterpolant = function(e) {
|
|
3778
|
-
return new (this instanceof
|
|
3778
|
+
return new (this instanceof _t ? vi : gi)(this.times, this.values, this.getValueSize() / 3, e);
|
|
3779
3779
|
}, e.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline = !0;
|
|
3780
3780
|
}
|
|
3781
3781
|
};
|
|
3782
3782
|
function zi(e, t, n) {
|
|
3783
|
-
let r = t.attributes, i = new
|
|
3783
|
+
let r = t.attributes, i = new _e();
|
|
3784
3784
|
if (r.POSITION !== void 0) {
|
|
3785
3785
|
let e = n.json.accessors[r.POSITION], t = e.min, a = e.max;
|
|
3786
3786
|
if (t !== void 0 && a !== void 0) {
|
|
3787
|
-
if (i.set(new
|
|
3787
|
+
if (i.set(new K(t[0], t[1], t[2]), new K(a[0], a[1], a[2])), e.normalized) {
|
|
3788
3788
|
let t = Fi(bi[e.componentType]);
|
|
3789
3789
|
i.min.multiplyScalar(t), i.max.multiplyScalar(t);
|
|
3790
3790
|
}
|
|
@@ -3795,7 +3795,7 @@ function zi(e, t, n) {
|
|
|
3795
3795
|
} else return;
|
|
3796
3796
|
let a = t.targets;
|
|
3797
3797
|
if (a !== void 0) {
|
|
3798
|
-
let e = new
|
|
3798
|
+
let e = new K(), t = new K();
|
|
3799
3799
|
for (let r = 0, i = a.length; r < i; r++) {
|
|
3800
3800
|
let i = a[r];
|
|
3801
3801
|
if (i.POSITION !== void 0) {
|
|
@@ -3812,7 +3812,7 @@ function zi(e, t, n) {
|
|
|
3812
3812
|
i.expandByVector(e);
|
|
3813
3813
|
}
|
|
3814
3814
|
e.boundingBox = i;
|
|
3815
|
-
let o = new
|
|
3815
|
+
let o = new wt();
|
|
3816
3816
|
i.getCenter(o.center), o.radius = i.min.distanceTo(i.max) / 2, e.boundingSphere = o;
|
|
3817
3817
|
}
|
|
3818
3818
|
function Bi(e, t, n) {
|
|
@@ -3832,13 +3832,13 @@ function Bi(e, t, n) {
|
|
|
3832
3832
|
});
|
|
3833
3833
|
i.push(r);
|
|
3834
3834
|
}
|
|
3835
|
-
return
|
|
3835
|
+
return Se.workingColorSpace !== Ge && "COLOR_0" in r && console.warn(`THREE.GLTFLoader: Converting vertex colors from "srgb-linear" to "${Se.workingColorSpace}" not supported.`), Ai(e, t), zi(e, t, n), Promise.all(i).then(function() {
|
|
3836
3836
|
return t.targets === void 0 ? e : ji(e, t.targets, n);
|
|
3837
3837
|
});
|
|
3838
3838
|
}
|
|
3839
3839
|
//#endregion
|
|
3840
3840
|
//#region ../../node_modules/.pnpm/three@0.184.0/node_modules/three/examples/jsm/loaders/OBJLoader.js
|
|
3841
|
-
var Vi = /^[og]\s*(.+)?/, Hi = /^mtllib /, Ui = /^usemtl /, Wi = /^usemap /, Gi = /\s+/, Ki = new
|
|
3841
|
+
var Vi = /^[og]\s*(.+)?/, Hi = /^mtllib /, Ui = /^usemtl /, Wi = /^usemap /, Gi = /\s+/, Ki = new K(), qi = new K(), Ji = new K(), Yi = new K(), Xi = new K(), Zi = new xe();
|
|
3842
3842
|
function Qi() {
|
|
3843
3843
|
let e = {
|
|
3844
3844
|
objects: [],
|
|
@@ -3991,12 +3991,12 @@ function Qi() {
|
|
|
3991
3991
|
};
|
|
3992
3992
|
return e.startObject("", !1), e;
|
|
3993
3993
|
}
|
|
3994
|
-
var $i = class extends
|
|
3994
|
+
var $i = class extends Ke {
|
|
3995
3995
|
constructor(e) {
|
|
3996
3996
|
super(e), this.materials = null;
|
|
3997
3997
|
}
|
|
3998
3998
|
load(e, t, n, r) {
|
|
3999
|
-
let i = this, a = new
|
|
3999
|
+
let i = this, a = new De(this.manager);
|
|
4000
4000
|
a.setPath(this.path), a.setRequestHeader(this.requestHeader), a.setWithCredentials(this.withCredentials), a.load(e, function(n) {
|
|
4001
4001
|
try {
|
|
4002
4002
|
t(i.parse(n));
|
|
@@ -4020,7 +4020,7 @@ var $i = class extends Je {
|
|
|
4020
4020
|
let e = i.split(Gi);
|
|
4021
4021
|
switch (e[0]) {
|
|
4022
4022
|
case "v":
|
|
4023
|
-
t.vertices.push(parseFloat(e[1]), parseFloat(e[2]), parseFloat(e[3])), e.length >= 7 ? (Zi.setRGB(parseFloat(e[4]), parseFloat(e[5]), parseFloat(e[6]),
|
|
4023
|
+
t.vertices.push(parseFloat(e[1]), parseFloat(e[2]), parseFloat(e[3])), e.length >= 7 ? (Zi.setRGB(parseFloat(e[4]), parseFloat(e[5]), parseFloat(e[6]), xt), t.colors.push(Zi.r, Zi.g, Zi.b)) : t.colors.push(void 0, void 0, void 0);
|
|
4024
4024
|
break;
|
|
4025
4025
|
case "vn":
|
|
4026
4026
|
t.normals.push(parseFloat(e[1]), parseFloat(e[2]), parseFloat(e[3]));
|
|
@@ -4073,31 +4073,31 @@ var $i = class extends Je {
|
|
|
4073
4073
|
}
|
|
4074
4074
|
}
|
|
4075
4075
|
t.finalize();
|
|
4076
|
-
let i = new
|
|
4076
|
+
let i = new Ae();
|
|
4077
4077
|
if (i.materialLibraries = [].concat(t.materialLibraries), !(t.objects.length === 1 && t.objects[0].geometry.vertices.length === 0)) for (let e = 0, n = t.objects.length; e < n; e++) {
|
|
4078
4078
|
let n = t.objects[e], r = n.geometry, a = n.materials, o = r.type === "Line", s = r.type === "Points", c = !1;
|
|
4079
4079
|
if (r.vertices.length === 0) continue;
|
|
4080
|
-
let l = new
|
|
4081
|
-
l.setAttribute("position", new
|
|
4080
|
+
let l = new ye();
|
|
4081
|
+
l.setAttribute("position", new Oe(r.vertices, 3)), r.normals.length > 0 && l.setAttribute("normal", new Oe(r.normals, 3)), r.colors.length > 0 && (c = !0, l.setAttribute("color", new Oe(r.colors, 3))), r.hasUVIndices === !0 && l.setAttribute("uv", new Oe(r.uvs, 2));
|
|
4082
4082
|
let u = [];
|
|
4083
4083
|
for (let e = 0, n = a.length; e < n; e++) {
|
|
4084
4084
|
let n = a[e], r = n.name + "_" + n.smooth + "_" + c, i = t.materials[r];
|
|
4085
4085
|
if (this.materials !== null) {
|
|
4086
|
-
if (i = this.materials.create(n.name), o && i && !(i instanceof
|
|
4087
|
-
let e = new
|
|
4088
|
-
|
|
4089
|
-
} else if (s && i && !(i instanceof
|
|
4090
|
-
let e = new
|
|
4086
|
+
if (i = this.materials.create(n.name), o && i && !(i instanceof ze)) {
|
|
4087
|
+
let e = new ze();
|
|
4088
|
+
Ye.prototype.copy.call(e, i), e.color.copy(i.color), i = e;
|
|
4089
|
+
} else if (s && i && !(i instanceof ht)) {
|
|
4090
|
+
let e = new ht({
|
|
4091
4091
|
size: 10,
|
|
4092
4092
|
sizeAttenuation: !1
|
|
4093
4093
|
});
|
|
4094
|
-
|
|
4094
|
+
Ye.prototype.copy.call(e, i), e.color.copy(i.color), e.map = i.map, i = e;
|
|
4095
4095
|
}
|
|
4096
4096
|
}
|
|
4097
|
-
i === void 0 && (i = o ? new
|
|
4097
|
+
i === void 0 && (i = o ? new ze() : s ? new ht({
|
|
4098
4098
|
size: 1,
|
|
4099
4099
|
sizeAttenuation: !1
|
|
4100
|
-
}) : new
|
|
4100
|
+
}) : new $e(), i.name = n.name, i.flatShading = !n.smooth, i.vertexColors = c, t.materials[r] = i), u.push(i);
|
|
4101
4101
|
}
|
|
4102
4102
|
let d;
|
|
4103
4103
|
if (u.length > 1) {
|
|
@@ -4105,22 +4105,22 @@ var $i = class extends Je {
|
|
|
4105
4105
|
let t = a[e];
|
|
4106
4106
|
l.addGroup(t.groupStart, t.groupCount, e);
|
|
4107
4107
|
}
|
|
4108
|
-
d = o ? new
|
|
4109
|
-
} else d = o ? new
|
|
4108
|
+
d = o ? new Ve(l, u) : s ? new mt(l, u) : new U(l, u);
|
|
4109
|
+
} else d = o ? new Ve(l, u[0]) : s ? new mt(l, u[0]) : new U(l, u[0]);
|
|
4110
4110
|
d.name = n.name, i.add(d);
|
|
4111
4111
|
}
|
|
4112
4112
|
else if (t.vertices.length > 0) {
|
|
4113
|
-
let e = new
|
|
4113
|
+
let e = new ht({
|
|
4114
4114
|
size: 1,
|
|
4115
4115
|
sizeAttenuation: !1
|
|
4116
|
-
}), n = new
|
|
4117
|
-
n.setAttribute("position", new
|
|
4118
|
-
let r = new
|
|
4116
|
+
}), n = new ye();
|
|
4117
|
+
n.setAttribute("position", new Oe(t.vertices, 3)), t.colors.length > 0 && t.colors[0] !== void 0 && (n.setAttribute("color", new Oe(t.colors, 3)), e.vertexColors = !0);
|
|
4118
|
+
let r = new mt(n, e);
|
|
4119
4119
|
i.add(r);
|
|
4120
4120
|
}
|
|
4121
4121
|
return i;
|
|
4122
4122
|
}
|
|
4123
|
-
}, ea = /*#__PURE__*/
|
|
4123
|
+
}, ea = /*#__PURE__*/ Bt({
|
|
4124
4124
|
__name: "Viewport3D",
|
|
4125
4125
|
props: {
|
|
4126
4126
|
meshes: {
|
|
@@ -4149,17 +4149,17 @@ var $i = class extends Je {
|
|
|
4149
4149
|
setup(e, { expose: t, emit: n }) {
|
|
4150
4150
|
let r = e, o = n, s = _(null), c = _(null), l = _(null), u, d, f, g, v, y, b, x, S = {}, w = {}, T = null, E = /* @__PURE__ */ new Set(), D = () => {
|
|
4151
4151
|
let e = c.value, t = s.value;
|
|
4152
|
-
u = new
|
|
4152
|
+
u = new z.Scene(), u.background = new z.Color(15790320), d = new z.PerspectiveCamera(50, t.clientWidth / t.clientHeight, .1, 1e3), d.position.set(5, 5, 8), f = new z.WebGLRenderer({
|
|
4153
4153
|
canvas: e,
|
|
4154
4154
|
antialias: !0
|
|
4155
|
-
}), f.setSize(t.clientWidth, t.clientHeight), f.setPixelRatio(window.devicePixelRatio), g = new
|
|
4155
|
+
}), f.setSize(t.clientWidth, t.clientHeight), f.setPixelRatio(window.devicePixelRatio), g = new Rr(), g.setSize(t.clientWidth, t.clientHeight), g.domElement.style.position = "absolute", g.domElement.style.top = "0", g.domElement.style.left = "0", g.domElement.style.pointerEvents = "none", t.appendChild(g.domElement), v = new Un(d, f.domElement), v.enableDamping = !0, y = new lr(d, f.domElement), y.addEventListener("dragging-changed", (e) => {
|
|
4156
4156
|
v.enabled = !e.value;
|
|
4157
|
-
}), y.addEventListener("objectChange",
|
|
4158
|
-
let n = new
|
|
4157
|
+
}), y.addEventListener("objectChange", P), b = new z.Raycaster(), x = new z.Vector2();
|
|
4158
|
+
let n = new z.AmbientLight(16777215, .6);
|
|
4159
4159
|
u.add(n);
|
|
4160
|
-
let r = new
|
|
4160
|
+
let r = new z.DirectionalLight(16777215, .8);
|
|
4161
4161
|
r.position.set(5, 10, 7), u.add(r);
|
|
4162
|
-
let i = new
|
|
4162
|
+
let i = new z.GridHelper(20, 20, 13421772, 14737632);
|
|
4163
4163
|
u.add(i), O();
|
|
4164
4164
|
}, O = () => {
|
|
4165
4165
|
T = requestAnimationFrame(O), v.update(), f.render(u, d), g.render(u, d);
|
|
@@ -4167,103 +4167,103 @@ var $i = class extends Je {
|
|
|
4167
4167
|
let t, n = e.scale || 1;
|
|
4168
4168
|
switch (e.shape) {
|
|
4169
4169
|
case "cube":
|
|
4170
|
-
t = new
|
|
4170
|
+
t = new z.BoxGeometry(n, n, n);
|
|
4171
4171
|
break;
|
|
4172
4172
|
case "sphere":
|
|
4173
|
-
t = new
|
|
4173
|
+
t = new z.SphereGeometry(n * .5, 32, 32);
|
|
4174
4174
|
break;
|
|
4175
4175
|
case "cylinder":
|
|
4176
|
-
t = new
|
|
4176
|
+
t = new z.CylinderGeometry(n * .4, n * .4, n, 32);
|
|
4177
4177
|
break;
|
|
4178
4178
|
case "cone":
|
|
4179
|
-
t = new
|
|
4179
|
+
t = new z.ConeGeometry(n * .4, n, 32);
|
|
4180
4180
|
break;
|
|
4181
4181
|
case "torus":
|
|
4182
|
-
t = new
|
|
4182
|
+
t = new z.TorusGeometry(n * .4, n * .15, 16, 48);
|
|
4183
4183
|
break;
|
|
4184
4184
|
case "tetrahedron":
|
|
4185
|
-
t = new
|
|
4185
|
+
t = new z.TetrahedronGeometry(n * .5);
|
|
4186
4186
|
break;
|
|
4187
4187
|
case "octahedron":
|
|
4188
|
-
t = new
|
|
4188
|
+
t = new z.OctahedronGeometry(n * .5);
|
|
4189
4189
|
break;
|
|
4190
4190
|
case "dodecahedron":
|
|
4191
|
-
t = new
|
|
4191
|
+
t = new z.DodecahedronGeometry(n * .5);
|
|
4192
4192
|
break;
|
|
4193
4193
|
case "icosahedron":
|
|
4194
|
-
t = new
|
|
4194
|
+
t = new z.IcosahedronGeometry(n * .5);
|
|
4195
4195
|
break;
|
|
4196
4196
|
case "torusKnot":
|
|
4197
|
-
t = new
|
|
4197
|
+
t = new z.TorusKnotGeometry(n * .3, n * .08, 100, 16);
|
|
4198
4198
|
break;
|
|
4199
4199
|
case "capsule":
|
|
4200
|
-
t = new
|
|
4200
|
+
t = new z.CapsuleGeometry(n * .25, n * .5, 16, 32);
|
|
4201
4201
|
break;
|
|
4202
4202
|
case "ring":
|
|
4203
|
-
t = new
|
|
4203
|
+
t = new z.RingGeometry(n * .2, n * .5, 32);
|
|
4204
4204
|
break;
|
|
4205
4205
|
case "plane":
|
|
4206
|
-
t = new
|
|
4206
|
+
t = new z.PlaneGeometry(n, n);
|
|
4207
4207
|
break;
|
|
4208
4208
|
case "circle":
|
|
4209
|
-
t = new
|
|
4209
|
+
t = new z.CircleGeometry(n * .5, 32);
|
|
4210
4210
|
break;
|
|
4211
4211
|
case "tube":
|
|
4212
|
-
t = new
|
|
4213
|
-
new
|
|
4214
|
-
new
|
|
4215
|
-
new
|
|
4216
|
-
new
|
|
4217
|
-
new
|
|
4212
|
+
t = new z.TubeGeometry(new z.CatmullRomCurve3([
|
|
4213
|
+
new z.Vector3(-n * .4, 0, 0),
|
|
4214
|
+
new z.Vector3(-n * .2, n * .2, 0),
|
|
4215
|
+
new z.Vector3(0, 0, n * .2),
|
|
4216
|
+
new z.Vector3(n * .2, -n * .2, 0),
|
|
4217
|
+
new z.Vector3(n * .4, 0, 0)
|
|
4218
4218
|
]), 64, n * .08, 16, !1);
|
|
4219
4219
|
break;
|
|
4220
4220
|
case "lathe":
|
|
4221
|
-
t = new
|
|
4222
|
-
new
|
|
4223
|
-
new
|
|
4224
|
-
new
|
|
4225
|
-
new
|
|
4226
|
-
new
|
|
4221
|
+
t = new z.LatheGeometry([
|
|
4222
|
+
new z.Vector2(0, -n * .5),
|
|
4223
|
+
new z.Vector2(n * .3, -n * .3),
|
|
4224
|
+
new z.Vector2(n * .4, 0),
|
|
4225
|
+
new z.Vector2(n * .3, n * .3),
|
|
4226
|
+
new z.Vector2(0, n * .5)
|
|
4227
4227
|
], 32);
|
|
4228
4228
|
break;
|
|
4229
4229
|
case "pyramid": {
|
|
4230
|
-
let e = new
|
|
4231
|
-
e.moveTo(0, n * .5), e.lineTo(-n * .5, -n * .5), e.lineTo(n * .5, -n * .5), e.closePath(), t = new
|
|
4230
|
+
let e = new z.Shape();
|
|
4231
|
+
e.moveTo(0, n * .5), e.lineTo(-n * .5, -n * .5), e.lineTo(n * .5, -n * .5), e.closePath(), t = new z.ExtrudeGeometry(e, {
|
|
4232
4232
|
depth: n * .5,
|
|
4233
4233
|
bevelEnabled: !1
|
|
4234
4234
|
}), t.center();
|
|
4235
4235
|
break;
|
|
4236
4236
|
}
|
|
4237
4237
|
case "star": {
|
|
4238
|
-
let e = new
|
|
4238
|
+
let e = new z.Shape(), r = n * .5, i = n * .2;
|
|
4239
4239
|
for (let t = 0; t < 10; t++) {
|
|
4240
4240
|
let n = t % 2 == 0 ? r : i, a = t * Math.PI / 5 - Math.PI / 2;
|
|
4241
4241
|
t === 0 ? e.moveTo(Math.cos(a) * n, Math.sin(a) * n) : e.lineTo(Math.cos(a) * n, Math.sin(a) * n);
|
|
4242
4242
|
}
|
|
4243
|
-
e.closePath(), t = new
|
|
4243
|
+
e.closePath(), t = new z.ExtrudeGeometry(e, {
|
|
4244
4244
|
depth: n * .2,
|
|
4245
4245
|
bevelEnabled: !1
|
|
4246
4246
|
}), t.center();
|
|
4247
4247
|
break;
|
|
4248
4248
|
}
|
|
4249
4249
|
case "arrow": {
|
|
4250
|
-
let e = new
|
|
4251
|
-
e.moveTo(0, n * .5), e.lineTo(n * .3, n * .1), e.lineTo(n * .15, n * .1), e.lineTo(n * .15, -n * .5), e.lineTo(-n * .15, -n * .5), e.lineTo(-n * .15, n * .1), e.lineTo(-n * .3, n * .1), e.closePath(), t = new
|
|
4250
|
+
let e = new z.Shape();
|
|
4251
|
+
e.moveTo(0, n * .5), e.lineTo(n * .3, n * .1), e.lineTo(n * .15, n * .1), e.lineTo(n * .15, -n * .5), e.lineTo(-n * .15, -n * .5), e.lineTo(-n * .15, n * .1), e.lineTo(-n * .3, n * .1), e.closePath(), t = new z.ExtrudeGeometry(e, {
|
|
4252
4252
|
depth: n * .15,
|
|
4253
4253
|
bevelEnabled: !1
|
|
4254
4254
|
}), t.center();
|
|
4255
4255
|
break;
|
|
4256
4256
|
}
|
|
4257
4257
|
case "heart": {
|
|
4258
|
-
let e = new
|
|
4259
|
-
e.moveTo(0, n * .3), e.bezierCurveTo(0, n * .5, -n * .5, n * .5, -n * .5, n * .1), e.bezierCurveTo(-n * .5, -n * .3, 0, -n * .3, 0, -n * .5), e.bezierCurveTo(0, -n * .3, n * .5, -n * .3, n * .5, n * .1), e.bezierCurveTo(n * .5, n * .5, 0, n * .5, 0, n * .3), t = new
|
|
4258
|
+
let e = new z.Shape();
|
|
4259
|
+
e.moveTo(0, n * .3), e.bezierCurveTo(0, n * .5, -n * .5, n * .5, -n * .5, n * .1), e.bezierCurveTo(-n * .5, -n * .3, 0, -n * .3, 0, -n * .5), e.bezierCurveTo(0, -n * .3, n * .5, -n * .3, n * .5, n * .1), e.bezierCurveTo(n * .5, n * .5, 0, n * .5, 0, n * .3), t = new z.ExtrudeGeometry(e, {
|
|
4260
4260
|
depth: n * .2,
|
|
4261
4261
|
bevelEnabled: !1
|
|
4262
4262
|
}), t.center();
|
|
4263
4263
|
break;
|
|
4264
4264
|
}
|
|
4265
4265
|
case "gear": {
|
|
4266
|
-
let e = new
|
|
4266
|
+
let e = new z.Shape();
|
|
4267
4267
|
n * .5;
|
|
4268
4268
|
let r = n * .4, i = n * .08;
|
|
4269
4269
|
for (let t = 0; t < 12; t++) {
|
|
@@ -4271,37 +4271,37 @@ var $i = class extends Je {
|
|
|
4271
4271
|
t === 0 && e.moveTo(Math.cos(n) * r, Math.sin(n) * r), e.lineTo(Math.cos(a) * r, Math.sin(a) * r), e.lineTo(Math.cos(a) * (r + i), Math.sin(a) * (r + i)), e.lineTo(Math.cos(o) * (r + i), Math.sin(o) * (r + i)), e.lineTo(Math.cos(s) * r, Math.sin(s) * r);
|
|
4272
4272
|
}
|
|
4273
4273
|
e.closePath();
|
|
4274
|
-
let a = new
|
|
4275
|
-
a.absarc(0, 0, n * .12, 0, Math.PI * 2, !0), e.holes.push(a), t = new
|
|
4274
|
+
let a = new z.Path();
|
|
4275
|
+
a.absarc(0, 0, n * .12, 0, Math.PI * 2, !0), e.holes.push(a), t = new z.ExtrudeGeometry(e, {
|
|
4276
4276
|
depth: n * .15,
|
|
4277
4277
|
bevelEnabled: !1
|
|
4278
4278
|
}), t.center();
|
|
4279
4279
|
break;
|
|
4280
4280
|
}
|
|
4281
4281
|
case "bearing":
|
|
4282
|
-
t = new
|
|
4282
|
+
t = new z.TorusGeometry(n * .35, n * .08, 16, 48);
|
|
4283
4283
|
break;
|
|
4284
4284
|
case "bolt": {
|
|
4285
|
-
let e = new
|
|
4285
|
+
let e = new z.Shape();
|
|
4286
4286
|
for (let t = 0; t < 6; t++) {
|
|
4287
4287
|
let r = t / 6 * Math.PI * 2 - Math.PI / 2, i = n * .18;
|
|
4288
4288
|
t === 0 ? e.moveTo(Math.cos(r) * i, Math.sin(r) * i) : e.lineTo(Math.cos(r) * i, Math.sin(r) * i);
|
|
4289
4289
|
}
|
|
4290
|
-
e.closePath(), t = new
|
|
4290
|
+
e.closePath(), t = new z.ExtrudeGeometry(e, {
|
|
4291
4291
|
depth: n * .15,
|
|
4292
4292
|
bevelEnabled: !1
|
|
4293
4293
|
}), t.center();
|
|
4294
4294
|
break;
|
|
4295
4295
|
}
|
|
4296
4296
|
case "nut": {
|
|
4297
|
-
let e = new
|
|
4297
|
+
let e = new z.Shape();
|
|
4298
4298
|
for (let t = 0; t < 6; t++) {
|
|
4299
4299
|
let r = t / 6 * Math.PI * 2 - Math.PI / 2, i = n * .22;
|
|
4300
4300
|
t === 0 ? e.moveTo(Math.cos(r) * i, Math.sin(r) * i) : e.lineTo(Math.cos(r) * i, Math.sin(r) * i);
|
|
4301
4301
|
}
|
|
4302
4302
|
e.closePath();
|
|
4303
|
-
let r = new
|
|
4304
|
-
r.absarc(0, 0, n * .1, 0, Math.PI * 2, !0), e.holes.push(r), t = new
|
|
4303
|
+
let r = new z.Path();
|
|
4304
|
+
r.absarc(0, 0, n * .1, 0, Math.PI * 2, !0), e.holes.push(r), t = new z.ExtrudeGeometry(e, {
|
|
4305
4305
|
depth: n * .12,
|
|
4306
4306
|
bevelEnabled: !1
|
|
4307
4307
|
}), t.center();
|
|
@@ -4311,127 +4311,127 @@ var $i = class extends Je {
|
|
|
4311
4311
|
let e = [], r = n * .2, i = n * .8;
|
|
4312
4312
|
for (let t = 0; t <= 192; t++) {
|
|
4313
4313
|
let n = t / 192, a = n * 6 * Math.PI * 2;
|
|
4314
|
-
e.push(new
|
|
4314
|
+
e.push(new z.Vector3(Math.cos(a) * r, (n - .5) * i, Math.sin(a) * r));
|
|
4315
4315
|
}
|
|
4316
|
-
let a = new
|
|
4317
|
-
t = new
|
|
4316
|
+
let a = new z.CatmullRomCurve3(e);
|
|
4317
|
+
t = new z.TubeGeometry(a, 200, n * .025, 8, !1);
|
|
4318
4318
|
break;
|
|
4319
4319
|
}
|
|
4320
4320
|
case "shaft":
|
|
4321
|
-
t = new
|
|
4321
|
+
t = new z.CylinderGeometry(n * .12, n * .12, n * .9, 32);
|
|
4322
4322
|
break;
|
|
4323
4323
|
case "flange": {
|
|
4324
|
-
let e = new
|
|
4324
|
+
let e = new z.Shape();
|
|
4325
4325
|
e.absarc(0, 0, n * .45, 0, Math.PI * 2, !1);
|
|
4326
|
-
let r = new
|
|
4327
|
-
r.absarc(0, 0, n * .15, 0, Math.PI * 2, !0), e.holes.push(r), t = new
|
|
4326
|
+
let r = new z.Path();
|
|
4327
|
+
r.absarc(0, 0, n * .15, 0, Math.PI * 2, !0), e.holes.push(r), t = new z.ExtrudeGeometry(e, {
|
|
4328
4328
|
depth: n * .1,
|
|
4329
4329
|
bevelEnabled: !1
|
|
4330
4330
|
}), t.center();
|
|
4331
4331
|
break;
|
|
4332
4332
|
}
|
|
4333
4333
|
case "coupling":
|
|
4334
|
-
t = new
|
|
4334
|
+
t = new z.CylinderGeometry(n * .25, n * .25, n * .4, 32);
|
|
4335
4335
|
break;
|
|
4336
4336
|
case "lBracket": {
|
|
4337
|
-
let e = new
|
|
4338
|
-
e.moveTo(-n * .3, -n * .3), e.lineTo(-n * .3, n * .3), e.lineTo(-n * .15, n * .3), e.lineTo(-n * .15, -n * .15), e.lineTo(n * .3, -n * .15), e.lineTo(n * .3, -n * .3), e.closePath(), t = new
|
|
4337
|
+
let e = new z.Shape();
|
|
4338
|
+
e.moveTo(-n * .3, -n * .3), e.lineTo(-n * .3, n * .3), e.lineTo(-n * .15, n * .3), e.lineTo(-n * .15, -n * .15), e.lineTo(n * .3, -n * .15), e.lineTo(n * .3, -n * .3), e.closePath(), t = new z.ExtrudeGeometry(e, {
|
|
4339
4339
|
depth: n * .1,
|
|
4340
4340
|
bevelEnabled: !1
|
|
4341
4341
|
}), t.center();
|
|
4342
4342
|
break;
|
|
4343
4343
|
}
|
|
4344
4344
|
case "uChannel": {
|
|
4345
|
-
let e = new
|
|
4346
|
-
e.moveTo(-n * .3, -n * .3), e.lineTo(-n * .3, n * .3), e.lineTo(-n * .15, n * .3), e.lineTo(-n * .15, -n * .15), e.lineTo(n * .15, -n * .15), e.lineTo(n * .15, n * .3), e.lineTo(n * .3, n * .3), e.lineTo(n * .3, -n * .3), e.closePath(), t = new
|
|
4345
|
+
let e = new z.Shape();
|
|
4346
|
+
e.moveTo(-n * .3, -n * .3), e.lineTo(-n * .3, n * .3), e.lineTo(-n * .15, n * .3), e.lineTo(-n * .15, -n * .15), e.lineTo(n * .15, -n * .15), e.lineTo(n * .15, n * .3), e.lineTo(n * .3, n * .3), e.lineTo(n * .3, -n * .3), e.closePath(), t = new z.ExtrudeGeometry(e, {
|
|
4347
4347
|
depth: n * .1,
|
|
4348
4348
|
bevelEnabled: !1
|
|
4349
4349
|
}), t.center();
|
|
4350
4350
|
break;
|
|
4351
4351
|
}
|
|
4352
4352
|
case "boxHousing":
|
|
4353
|
-
t = new
|
|
4353
|
+
t = new z.BoxGeometry(n * .6, n * .4, n * .5);
|
|
4354
4354
|
break;
|
|
4355
4355
|
case "endCap":
|
|
4356
|
-
t = new
|
|
4356
|
+
t = new z.CylinderGeometry(n * .35, n * .35, n * .08, 32);
|
|
4357
4357
|
break;
|
|
4358
4358
|
case "handle":
|
|
4359
|
-
t = new
|
|
4359
|
+
t = new z.CapsuleGeometry(n * .08, n * .4, 16, 32);
|
|
4360
4360
|
break;
|
|
4361
4361
|
case "button":
|
|
4362
|
-
t = new
|
|
4362
|
+
t = new z.CylinderGeometry(n * .15, n * .15, n * .05, 32);
|
|
4363
4363
|
break;
|
|
4364
4364
|
case "knob":
|
|
4365
|
-
t = new
|
|
4365
|
+
t = new z.SphereGeometry(n * .2, 32, 32);
|
|
4366
4366
|
break;
|
|
4367
4367
|
case "displayFrame": {
|
|
4368
|
-
let e = new
|
|
4368
|
+
let e = new z.Shape();
|
|
4369
4369
|
e.moveTo(-n * .4, -n * .3), e.lineTo(-n * .4, n * .3), e.lineTo(n * .4, n * .3), e.lineTo(n * .4, -n * .3), e.closePath();
|
|
4370
|
-
let r = new
|
|
4371
|
-
r.moveTo(-n * .32, -n * .22), r.lineTo(-n * .32, n * .22), r.lineTo(n * .32, n * .22), r.lineTo(n * .32, -n * .22), r.closePath(), e.holes.push(r), t = new
|
|
4370
|
+
let r = new z.Path();
|
|
4371
|
+
r.moveTo(-n * .32, -n * .22), r.lineTo(-n * .32, n * .22), r.lineTo(n * .32, n * .22), r.lineTo(n * .32, -n * .22), r.closePath(), e.holes.push(r), t = new z.ExtrudeGeometry(e, {
|
|
4372
4372
|
depth: n * .08,
|
|
4373
4373
|
bevelEnabled: !1
|
|
4374
4374
|
}), t.center();
|
|
4375
4375
|
break;
|
|
4376
4376
|
}
|
|
4377
|
-
default: t = new
|
|
4377
|
+
default: t = new z.BoxGeometry(n, n, n);
|
|
4378
4378
|
}
|
|
4379
|
-
let r = new
|
|
4379
|
+
let r = new z.MeshPhongMaterial({
|
|
4380
4380
|
color: e.color || 4235007,
|
|
4381
4381
|
transparent: !0,
|
|
4382
4382
|
opacity: .85
|
|
4383
|
-
}), i = new
|
|
4383
|
+
}), i = new z.Mesh(t, r);
|
|
4384
4384
|
return i.position.set(e.x || 0, e.y || 0, e.z || 0), i.userData = { id: e.id }, i;
|
|
4385
4385
|
}, A = (e) => {
|
|
4386
4386
|
let t = document.createElement("div");
|
|
4387
4387
|
t.className = "part-label", t.innerHTML = `<span class="part-name">${e.label || e.shape}</span>${e.notes ? `<span class="part-notes">${e.notes}</span>` : ""}`, t.addEventListener("dblclick", (t) => {
|
|
4388
4388
|
t.stopPropagation(), o("double-click", e.id);
|
|
4389
4389
|
});
|
|
4390
|
-
let n = new
|
|
4390
|
+
let n = new Mr(t);
|
|
4391
4391
|
return n.position.set(0, (e.scale || 1) * .5 + .3, 0), n;
|
|
4392
|
-
},
|
|
4392
|
+
}, j = (e) => r.meshes.filter((t) => t.parentId === e), M = (e) => {
|
|
4393
4393
|
if (!e.parentId) return !0;
|
|
4394
4394
|
let t = r.meshes.find((t) => t.id === e.parentId);
|
|
4395
|
-
return t ? E.has(t.id) ?
|
|
4396
|
-
},
|
|
4395
|
+
return t ? E.has(t.id) ? M(t) : !1 : !0;
|
|
4396
|
+
}, ee = () => {
|
|
4397
4397
|
Object.values(S).forEach((e) => {
|
|
4398
4398
|
e.traverse((e) => {
|
|
4399
4399
|
e.geometry && e.geometry.dispose(), e.material && (Array.isArray(e.material) ? e.material.forEach((e) => e.dispose()) : e.material.dispose());
|
|
4400
4400
|
}), u.remove(e);
|
|
4401
4401
|
}), Object.values(w).forEach((e) => u.remove(e)), S = {}, w = {}, r.meshes.forEach((e) => {
|
|
4402
|
-
if (!
|
|
4402
|
+
if (!M(e)) return;
|
|
4403
4403
|
let t = k(e);
|
|
4404
4404
|
if (S[e.id] = t, u.add(t), e.notes || e.label) {
|
|
4405
4405
|
let n = A(e);
|
|
4406
4406
|
t.add(n), w[e.id] = n;
|
|
4407
4407
|
}
|
|
4408
|
-
}),
|
|
4409
|
-
},
|
|
4408
|
+
}), te();
|
|
4409
|
+
}, te = () => {
|
|
4410
4410
|
if (!r.meshes.length) return;
|
|
4411
4411
|
let e = r.meshes.filter((e) => !e.parentId);
|
|
4412
4412
|
if (!e.length) return;
|
|
4413
|
-
let t = new
|
|
4414
|
-
e.forEach((e) => t.add(new
|
|
4413
|
+
let t = new z.Vector3();
|
|
4414
|
+
e.forEach((e) => t.add(new z.Vector3(e.x || 0, e.y || 0, e.z || 0))), t.divideScalar(e.length), r.meshes.forEach((e) => {
|
|
4415
4415
|
let n = S[e.id];
|
|
4416
4416
|
if (!n) return;
|
|
4417
4417
|
let i = e.x || 0, a = e.y || 0, o = e.z || 0;
|
|
4418
4418
|
if (e.parentId) {
|
|
4419
4419
|
let t = r.meshes.find((t) => t.id === e.parentId);
|
|
4420
4420
|
if (t) {
|
|
4421
|
-
let e = S[t.id], s = t.x || 0, c = t.y || 0, l = t.z || 0, u = i - s, d = a - c, f = o - l, p = new
|
|
4421
|
+
let e = S[t.id], s = t.x || 0, c = t.y || 0, l = t.z || 0, u = i - s, d = a - c, f = o - l, p = new z.Vector3(u, d, f);
|
|
4422
4422
|
p.length() < .01 && p.set(Math.random() - .5, Math.random() - .5, Math.random() - .5), p.normalize();
|
|
4423
|
-
let m = e ? e.position : new
|
|
4423
|
+
let m = e ? e.position : new z.Vector3(s, c, l);
|
|
4424
4424
|
n.position.set(m.x + u + p.x * r.explodeFactor * 1.5, m.y + d + p.y * r.explodeFactor * 1.5, m.z + f + p.z * r.explodeFactor * 1.5);
|
|
4425
4425
|
} else n.position.set(i, a, o);
|
|
4426
4426
|
} else {
|
|
4427
|
-
let e = new
|
|
4427
|
+
let e = new z.Vector3(i - t.x, a - t.y, o - t.z);
|
|
4428
4428
|
e.length() < .01 && e.set(Math.random() - .5, Math.random() - .5, Math.random() - .5), e.normalize(), n.position.set(i + e.x * r.explodeFactor, a + e.y * r.explodeFactor, o + e.z * r.explodeFactor);
|
|
4429
4429
|
}
|
|
4430
|
-
e.id === r.selectedId ? n.material.emissive = new
|
|
4430
|
+
e.id === r.selectedId ? n.material.emissive = new z.Color(4491519) : n.material.emissive = new z.Color(0);
|
|
4431
4431
|
});
|
|
4432
|
-
}, M = (e) => {
|
|
4433
|
-
E.has(e) ? E.delete(e) : E.add(e), te();
|
|
4434
4432
|
}, N = (e) => {
|
|
4433
|
+
E.has(e) ? E.delete(e) : E.add(e), ee();
|
|
4434
|
+
}, ne = (e) => {
|
|
4435
4435
|
let t = c.value.getBoundingClientRect();
|
|
4436
4436
|
x.x = (e.clientX - t.left) / t.width * 2 - 1, x.y = -((e.clientY - t.top) / t.height) * 2 + 1, b.setFromCamera(x, d);
|
|
4437
4437
|
let n = Object.values(S), r = b.intersectObjects(n);
|
|
@@ -4441,15 +4441,15 @@ var $i = class extends Je {
|
|
|
4441
4441
|
let t = S[e];
|
|
4442
4442
|
t && y.attach(t);
|
|
4443
4443
|
} else y.detach();
|
|
4444
|
-
},
|
|
4444
|
+
}, re = (e) => {
|
|
4445
4445
|
let t = c.value.getBoundingClientRect();
|
|
4446
4446
|
x.x = (e.clientX - t.left) / t.width * 2 - 1, x.y = -((e.clientY - t.top) / t.height) * 2 + 1, b.setFromCamera(x, d);
|
|
4447
4447
|
let n = Object.values(S), i = b.intersectObjects(n);
|
|
4448
4448
|
if (i.length > 0) {
|
|
4449
4449
|
let e = i[0].object.userData.id;
|
|
4450
|
-
r.meshes.find((t) => t.id === e) &&
|
|
4450
|
+
r.meshes.find((t) => t.id === e) && j(e).length > 0 && N(e);
|
|
4451
4451
|
}
|
|
4452
|
-
},
|
|
4452
|
+
}, P = () => {
|
|
4453
4453
|
if (!y.object) return;
|
|
4454
4454
|
let e = y.object, t = e.userData.id;
|
|
4455
4455
|
o("position-change", {
|
|
@@ -4458,7 +4458,7 @@ var $i = class extends Je {
|
|
|
4458
4458
|
y: Math.round(e.position.y * 100) / 100,
|
|
4459
4459
|
z: Math.round(e.position.z * 100) / 100
|
|
4460
4460
|
});
|
|
4461
|
-
},
|
|
4461
|
+
}, F = () => {
|
|
4462
4462
|
let e = s.value;
|
|
4463
4463
|
!e || !f || (d.aspect = e.clientWidth / e.clientHeight, d.updateProjectionMatrix(), f.setSize(e.clientWidth, e.clientHeight), g.setSize(e.clientWidth, e.clientHeight));
|
|
4464
4464
|
};
|
|
@@ -4467,7 +4467,7 @@ var $i = class extends Je {
|
|
|
4467
4467
|
d.position.set(5, 5, 8), v.target.set(0, 0, 0), v.update();
|
|
4468
4468
|
},
|
|
4469
4469
|
loadGLTF: (e) => {
|
|
4470
|
-
new
|
|
4470
|
+
new Ur().load(e, (e) => {
|
|
4471
4471
|
let t = e.scene;
|
|
4472
4472
|
t.traverse((e) => {
|
|
4473
4473
|
e.isMesh && (e.material.color.set(4235007), e.material.transparent = !0, e.material.opacity = .85);
|
|
@@ -4481,13 +4481,13 @@ var $i = class extends Je {
|
|
|
4481
4481
|
}), u.add(e);
|
|
4482
4482
|
});
|
|
4483
4483
|
},
|
|
4484
|
-
toggleExpand:
|
|
4485
|
-
}), C(() => r.meshes,
|
|
4486
|
-
|
|
4487
|
-
}), C(() => r.expandLevel,
|
|
4488
|
-
D(),
|
|
4484
|
+
toggleExpand: N
|
|
4485
|
+
}), C(() => r.meshes, ee, { deep: !0 }), C(() => r.explodeFactor, te), C(() => r.selectedId, (e) => {
|
|
4486
|
+
te(), e && S[e] ? y.attach(S[e]) : y.detach();
|
|
4487
|
+
}), C(() => r.expandLevel, ee), p(() => {
|
|
4488
|
+
D(), ee(), c.value.addEventListener("click", ne), c.value.addEventListener("dblclick", re), window.addEventListener("resize", F);
|
|
4489
4489
|
}), m(() => {
|
|
4490
|
-
cancelAnimationFrame(T), c.value?.removeEventListener("click",
|
|
4490
|
+
cancelAnimationFrame(T), c.value?.removeEventListener("click", ne), c.value?.removeEventListener("dblclick", re), window.removeEventListener("resize", F), u?.traverse((e) => {
|
|
4491
4491
|
e.geometry && e.geometry.dispose(), e.material && (Array.isArray(e.material) ? e.material.forEach((e) => e.dispose()) : e.material.dispose());
|
|
4492
4492
|
}), v?.dispose(), y?.dispose(), f?.dispose(), g?.domElement?.parentElement?.removeChild(g.domElement);
|
|
4493
4493
|
}), (e, t) => (h(), i("div", {
|
|
@@ -4506,7 +4506,7 @@ var $i = class extends Je {
|
|
|
4506
4506
|
}, [["__scopeId", "data-v-1fe4a338"]]), ta = { class: "library-header" }, na = { key: 0 }, ra = {
|
|
4507
4507
|
key: 0,
|
|
4508
4508
|
class: "library-body"
|
|
4509
|
-
}, ia = { class: "library-top" }, aa = { class: "category-tabs" }, oa = { class: "model-list" }, sa = ["onDragstart", "onClick"], ca = { class: "model-info" }, la = { class: "model-name" }, ua = { class: "model-desc" }, da = { class: "library-bottom" }, fa = /*#__PURE__*/
|
|
4509
|
+
}, ia = { class: "library-top" }, aa = { class: "category-tabs" }, oa = { class: "model-list" }, sa = ["onDragstart", "onClick"], ca = { class: "model-info" }, la = { class: "model-name" }, ua = { class: "model-desc" }, da = { class: "library-bottom" }, fa = /*#__PURE__*/ Bt({
|
|
4510
4510
|
__name: "ModelLibrary",
|
|
4511
4511
|
props: { models: {
|
|
4512
4512
|
type: Array,
|
|
@@ -4555,7 +4555,7 @@ var $i = class extends Je {
|
|
|
4555
4555
|
class: "search-input"
|
|
4556
4556
|
}, {
|
|
4557
4557
|
prefix: w(() => [s(l, null, {
|
|
4558
|
-
default: w(() => [s(S(
|
|
4558
|
+
default: w(() => [s(S(ue))]),
|
|
4559
4559
|
_: 1
|
|
4560
4560
|
})]),
|
|
4561
4561
|
_: 1
|
|
@@ -4568,7 +4568,7 @@ var $i = class extends Je {
|
|
|
4568
4568
|
class: d(["tab-btn", { active: C.value === "all" }]),
|
|
4569
4569
|
onClick: c[2] ||= (e) => C.value = "all"
|
|
4570
4570
|
}, [s(l, null, {
|
|
4571
|
-
default: w(() => [s(S(
|
|
4571
|
+
default: w(() => [s(S(L))]),
|
|
4572
4572
|
_: 1
|
|
4573
4573
|
})], 2)]),
|
|
4574
4574
|
_: 1
|
|
@@ -4581,7 +4581,7 @@ var $i = class extends Je {
|
|
|
4581
4581
|
class: d(["tab-btn", { active: C.value === "basic" }]),
|
|
4582
4582
|
onClick: c[3] ||= (e) => C.value = "basic"
|
|
4583
4583
|
}, [s(l, null, {
|
|
4584
|
-
default: w(() => [s(S(
|
|
4584
|
+
default: w(() => [s(S(N))]),
|
|
4585
4585
|
_: 1
|
|
4586
4586
|
})], 2)]),
|
|
4587
4587
|
_: 1
|
|
@@ -4594,7 +4594,7 @@ var $i = class extends Je {
|
|
|
4594
4594
|
class: d(["tab-btn", { active: C.value === "mechanical" }]),
|
|
4595
4595
|
onClick: c[4] ||= (e) => C.value = "mechanical"
|
|
4596
4596
|
}, [s(l, null, {
|
|
4597
|
-
default: w(() => [s(S(
|
|
4597
|
+
default: w(() => [s(S(de))]),
|
|
4598
4598
|
_: 1
|
|
4599
4599
|
})], 2)]),
|
|
4600
4600
|
_: 1
|
|
@@ -4607,7 +4607,7 @@ var $i = class extends Je {
|
|
|
4607
4607
|
class: d(["tab-btn", { active: C.value === "bracket" }]),
|
|
4608
4608
|
onClick: c[5] ||= (e) => C.value = "bracket"
|
|
4609
4609
|
}, [s(l, null, {
|
|
4610
|
-
default: w(() => [s(S(
|
|
4610
|
+
default: w(() => [s(S(P))]),
|
|
4611
4611
|
_: 1
|
|
4612
4612
|
})], 2)]),
|
|
4613
4613
|
_: 1
|
|
@@ -4620,7 +4620,7 @@ var $i = class extends Je {
|
|
|
4620
4620
|
class: d(["tab-btn", { active: C.value === "product" }]),
|
|
4621
4621
|
onClick: c[6] ||= (e) => C.value = "product"
|
|
4622
4622
|
}, [s(l, null, {
|
|
4623
|
-
default: w(() => [s(S(
|
|
4623
|
+
default: w(() => [s(S(pe))]),
|
|
4624
4624
|
_: 1
|
|
4625
4625
|
})], 2)]),
|
|
4626
4626
|
_: 1
|
|
@@ -4651,7 +4651,7 @@ var $i = class extends Je {
|
|
|
4651
4651
|
disabled: !T.value
|
|
4652
4652
|
}, {
|
|
4653
4653
|
default: w(() => [s(l, null, {
|
|
4654
|
-
default: w(() => [s(S(
|
|
4654
|
+
default: w(() => [s(S(I))]),
|
|
4655
4655
|
_: 1
|
|
4656
4656
|
})]),
|
|
4657
4657
|
_: 1
|
|
@@ -4664,7 +4664,7 @@ var $i = class extends Je {
|
|
|
4664
4664
|
onClick: c[8] ||= (e) => t.$emit("upload-file")
|
|
4665
4665
|
}, {
|
|
4666
4666
|
default: w(() => [s(l, null, {
|
|
4667
|
-
default: w(() => [s(S(
|
|
4667
|
+
default: w(() => [s(S(me))]),
|
|
4668
4668
|
_: 1
|
|
4669
4669
|
}), c[9] ||= o(" 上传本地文件 ", -1)]),
|
|
4670
4670
|
_: 1
|
|
@@ -4688,7 +4688,7 @@ var $i = class extends Je {
|
|
|
4688
4688
|
}, Sa = { class: "panel-section" }, Ca = { class: "control-row" }, wa = { class: "control-row" }, Ta = { class: "btn-row" }, Ea = { class: "panel-section" }, Da = { class: "section-title" }, Oa = { class: "parts-list" }, ka = ["onMouseenter"], Aa = {
|
|
4689
4689
|
key: 0,
|
|
4690
4690
|
class: "empty-hint"
|
|
4691
|
-
}, ja = /*#__PURE__*/
|
|
4691
|
+
}, ja = /*#__PURE__*/ Bt({
|
|
4692
4692
|
__name: "ModelExplosionPanel",
|
|
4693
4693
|
props: {
|
|
4694
4694
|
parts: {
|
|
@@ -4749,54 +4749,54 @@ var $i = class extends Je {
|
|
|
4749
4749
|
"file-selected"
|
|
4750
4750
|
],
|
|
4751
4751
|
setup(c, { emit: l }) {
|
|
4752
|
-
let u = c, p = l, m = _(null), g = _(null), b = _(u.currentProvider), S = _(u.apiKey), C = _("radial"), T = _(0), D = _("fast"), O = t(() => u.providers), k = t(() => Object.fromEntries(Object.entries(u.providers).filter(([, e]) => e.speed === "fast"))), A = t(() => Object.fromEntries(Object.entries(u.providers).filter(([, e]) => e.speed === "quality"))),
|
|
4752
|
+
let u = c, p = l, m = _(null), g = _(null), b = _(u.currentProvider), S = _(u.apiKey), C = _("radial"), T = _(0), D = _("fast"), O = t(() => u.providers), k = t(() => Object.fromEntries(Object.entries(u.providers).filter(([, e]) => e.speed === "fast"))), A = t(() => Object.fromEntries(Object.entries(u.providers).filter(([, e]) => e.speed === "quality"))), j = t(() => {
|
|
4753
4753
|
switch (D.value) {
|
|
4754
4754
|
case "fast": return "快速生成3D模型";
|
|
4755
4755
|
case "quality": return "高质量生成3D模型";
|
|
4756
4756
|
case "both": return "同时生成(预览+高质量)";
|
|
4757
4757
|
default: return "生成3D模型";
|
|
4758
4758
|
}
|
|
4759
|
-
}),
|
|
4759
|
+
}), M = () => {
|
|
4760
4760
|
m.value?.click();
|
|
4761
|
-
},
|
|
4761
|
+
}, ee = (e) => {
|
|
4762
4762
|
let t = e.target.files[0];
|
|
4763
|
-
t &&
|
|
4764
|
-
},
|
|
4763
|
+
t && N(t);
|
|
4764
|
+
}, te = (e) => {
|
|
4765
4765
|
let t = e.dataTransfer.files[0];
|
|
4766
|
-
t && t.type.startsWith("image/") &&
|
|
4767
|
-
},
|
|
4766
|
+
t && t.type.startsWith("image/") && N(t);
|
|
4767
|
+
}, N = (e) => {
|
|
4768
4768
|
g.value = URL.createObjectURL(e), p("file-selected", e);
|
|
4769
|
-
},
|
|
4769
|
+
}, ne = () => {
|
|
4770
4770
|
g.value = null, p("file-selected", null);
|
|
4771
|
-
},
|
|
4771
|
+
}, re = () => {
|
|
4772
4772
|
p("provider-change", b.value), p("api-key-change", S.value), D.value === "both" ? p("generate-both") : p("generate");
|
|
4773
4773
|
};
|
|
4774
4774
|
return (t, l) => {
|
|
4775
|
-
let u = y("Upload"), p = y("el-icon"), _ = y("Close"),
|
|
4775
|
+
let u = y("Upload"), p = y("el-icon"), _ = y("Close"), N = y("el-button"), P = y("el-option"), F = y("el-option-group"), I = y("el-select"), ie = y("el-input"), ae = y("el-divider"), L = y("el-slider"), oe = y("el-checkbox"), se = y("el-color-picker");
|
|
4776
4776
|
return h(), i("div", pa, [
|
|
4777
4777
|
l[24] ||= a("div", { class: "panel-header" }, [a("h4", null, "模型爆炸图")], -1),
|
|
4778
4778
|
a("div", ma, [
|
|
4779
4779
|
l[18] ||= a("div", { class: "section-title" }, "图片生成3D", -1),
|
|
4780
4780
|
a("div", {
|
|
4781
4781
|
class: "upload-area",
|
|
4782
|
-
onClick:
|
|
4782
|
+
onClick: M,
|
|
4783
4783
|
onDragover: l[0] ||= E(() => {}, ["prevent"]),
|
|
4784
|
-
onDrop: E(
|
|
4784
|
+
onDrop: E(te, ["prevent"])
|
|
4785
4785
|
}, [a("input", {
|
|
4786
4786
|
ref_key: "fileInput",
|
|
4787
4787
|
ref: m,
|
|
4788
4788
|
type: "file",
|
|
4789
4789
|
accept: "image/*",
|
|
4790
4790
|
style: { display: "none" },
|
|
4791
|
-
onChange:
|
|
4791
|
+
onChange: ee
|
|
4792
4792
|
}, null, 544), g.value ? (h(), i("div", ga, [a("img", {
|
|
4793
4793
|
src: g.value,
|
|
4794
4794
|
class: "preview-img"
|
|
4795
|
-
}, null, 8, _a), s(
|
|
4795
|
+
}, null, 8, _a), s(N, {
|
|
4796
4796
|
size: "small",
|
|
4797
4797
|
circle: "",
|
|
4798
4798
|
class: "remove-btn",
|
|
4799
|
-
onClick: E(
|
|
4799
|
+
onClick: E(ne, ["stop"])
|
|
4800
4800
|
}, {
|
|
4801
4801
|
default: w(() => [s(p, null, {
|
|
4802
4802
|
default: w(() => [s(_)]),
|
|
@@ -4837,7 +4837,7 @@ var $i = class extends Je {
|
|
|
4837
4837
|
a("span", { class: "mode-desc" }, "先预览后替换", -1)
|
|
4838
4838
|
]], 2)
|
|
4839
4839
|
]),
|
|
4840
|
-
a("div", ya, [s(
|
|
4840
|
+
a("div", ya, [s(I, {
|
|
4841
4841
|
modelValue: b.value,
|
|
4842
4842
|
"onUpdate:modelValue": l[4] ||= (e) => b.value = e,
|
|
4843
4843
|
size: "small",
|
|
@@ -4846,31 +4846,31 @@ var $i = class extends Je {
|
|
|
4846
4846
|
"margin-bottom": "6px"
|
|
4847
4847
|
}
|
|
4848
4848
|
}, {
|
|
4849
|
-
default: w(() => [D.value === "fast" ? (h(), n(
|
|
4849
|
+
default: w(() => [D.value === "fast" ? (h(), n(F, {
|
|
4850
4850
|
key: 0,
|
|
4851
4851
|
label: "快速模式"
|
|
4852
4852
|
}, {
|
|
4853
|
-
default: w(() => [(h(!0), i(e, null, v(k.value, (e, t) => (h(), n(
|
|
4853
|
+
default: w(() => [(h(!0), i(e, null, v(k.value, (e, t) => (h(), n(P, {
|
|
4854
4854
|
key: t,
|
|
4855
4855
|
value: t,
|
|
4856
4856
|
label: e.name
|
|
4857
4857
|
}, null, 8, ["value", "label"]))), 128))]),
|
|
4858
4858
|
_: 1
|
|
4859
|
-
})) : D.value === "quality" ? (h(), n(
|
|
4859
|
+
})) : D.value === "quality" ? (h(), n(F, {
|
|
4860
4860
|
key: 1,
|
|
4861
4861
|
label: "高质量模式"
|
|
4862
4862
|
}, {
|
|
4863
|
-
default: w(() => [(h(!0), i(e, null, v(A.value, (e, t) => (h(), n(
|
|
4863
|
+
default: w(() => [(h(!0), i(e, null, v(A.value, (e, t) => (h(), n(P, {
|
|
4864
4864
|
key: t,
|
|
4865
4865
|
value: t,
|
|
4866
4866
|
label: e.name
|
|
4867
4867
|
}, null, 8, ["value", "label"]))), 128))]),
|
|
4868
4868
|
_: 1
|
|
4869
|
-
})) : (h(), n(
|
|
4869
|
+
})) : (h(), n(F, {
|
|
4870
4870
|
key: 2,
|
|
4871
4871
|
label: "全部提供商"
|
|
4872
4872
|
}, {
|
|
4873
|
-
default: w(() => [(h(!0), i(e, null, v(O.value, (e, t) => (h(), n(
|
|
4873
|
+
default: w(() => [(h(!0), i(e, null, v(O.value, (e, t) => (h(), n(P, {
|
|
4874
4874
|
key: t,
|
|
4875
4875
|
value: t,
|
|
4876
4876
|
label: e.name
|
|
@@ -4878,7 +4878,7 @@ var $i = class extends Je {
|
|
|
4878
4878
|
_: 1
|
|
4879
4879
|
}))]),
|
|
4880
4880
|
_: 1
|
|
4881
|
-
}, 8, ["modelValue"]), s(
|
|
4881
|
+
}, 8, ["modelValue"]), s(ie, {
|
|
4882
4882
|
modelValue: S.value,
|
|
4883
4883
|
"onUpdate:modelValue": l[5] ||= (e) => S.value = e,
|
|
4884
4884
|
size: "small",
|
|
@@ -4886,7 +4886,7 @@ var $i = class extends Je {
|
|
|
4886
4886
|
type: "password",
|
|
4887
4887
|
"show-password": ""
|
|
4888
4888
|
}, null, 8, ["modelValue"])]),
|
|
4889
|
-
s(
|
|
4889
|
+
s(N, {
|
|
4890
4890
|
size: "small",
|
|
4891
4891
|
type: "primary",
|
|
4892
4892
|
loading: c.isGenerating,
|
|
@@ -4895,9 +4895,9 @@ var $i = class extends Je {
|
|
|
4895
4895
|
width: "100%",
|
|
4896
4896
|
"margin-top": "6px"
|
|
4897
4897
|
},
|
|
4898
|
-
onClick:
|
|
4898
|
+
onClick: re
|
|
4899
4899
|
}, {
|
|
4900
|
-
default: w(() => [o(x(c.isGenerating ? c.generationStatus :
|
|
4900
|
+
default: w(() => [o(x(c.isGenerating ? c.generationStatus : j.value), 1)]),
|
|
4901
4901
|
_: 1
|
|
4902
4902
|
}, 8, ["loading", "disabled"]),
|
|
4903
4903
|
c.isGenerating ? (h(), i("div", ba, [a("div", {
|
|
@@ -4909,33 +4909,33 @@ var $i = class extends Je {
|
|
|
4909
4909
|
s(ae),
|
|
4910
4910
|
a("div", Sa, [
|
|
4911
4911
|
l[23] ||= a("div", { class: "section-title" }, "爆炸控制", -1),
|
|
4912
|
-
a("div", Ca, [l[19] ||= a("label", null, "样式", -1), s(
|
|
4912
|
+
a("div", Ca, [l[19] ||= a("label", null, "样式", -1), s(I, {
|
|
4913
4913
|
modelValue: C.value,
|
|
4914
4914
|
"onUpdate:modelValue": l[6] ||= (e) => C.value = e,
|
|
4915
4915
|
size: "small",
|
|
4916
4916
|
onChange: l[7] ||= (e) => t.$emit("style-change", e)
|
|
4917
4917
|
}, {
|
|
4918
4918
|
default: w(() => [
|
|
4919
|
-
s(
|
|
4919
|
+
s(P, {
|
|
4920
4920
|
value: "radial",
|
|
4921
4921
|
label: "径向爆炸"
|
|
4922
4922
|
}),
|
|
4923
|
-
s(
|
|
4923
|
+
s(P, {
|
|
4924
4924
|
value: "vertical",
|
|
4925
4925
|
label: "垂直分层"
|
|
4926
4926
|
}),
|
|
4927
|
-
s(
|
|
4927
|
+
s(P, {
|
|
4928
4928
|
value: "horizontal",
|
|
4929
4929
|
label: "水平展开"
|
|
4930
4930
|
}),
|
|
4931
|
-
s(
|
|
4931
|
+
s(P, {
|
|
4932
4932
|
value: "layered",
|
|
4933
4933
|
label: "等距分层"
|
|
4934
4934
|
})
|
|
4935
4935
|
]),
|
|
4936
4936
|
_: 1
|
|
4937
4937
|
}, 8, ["modelValue"])]),
|
|
4938
|
-
a("div", wa, [l[20] ||= a("label", null, "爆炸程度", -1), s(
|
|
4938
|
+
a("div", wa, [l[20] ||= a("label", null, "爆炸程度", -1), s(L, {
|
|
4939
4939
|
modelValue: T.value,
|
|
4940
4940
|
"onUpdate:modelValue": l[8] ||= (e) => T.value = e,
|
|
4941
4941
|
min: 0,
|
|
@@ -4944,13 +4944,13 @@ var $i = class extends Je {
|
|
|
4944
4944
|
size: "small",
|
|
4945
4945
|
onInput: l[9] ||= (e) => t.$emit("explosion-change", e / 100)
|
|
4946
4946
|
}, null, 8, ["modelValue"])]),
|
|
4947
|
-
a("div", Ta, [s(
|
|
4947
|
+
a("div", Ta, [s(N, {
|
|
4948
4948
|
size: "small",
|
|
4949
4949
|
onClick: l[10] ||= (e) => t.$emit("explode")
|
|
4950
4950
|
}, {
|
|
4951
4951
|
default: w(() => [...l[21] ||= [o("展开", -1)]]),
|
|
4952
4952
|
_: 1
|
|
4953
|
-
}), s(
|
|
4953
|
+
}), s(N, {
|
|
4954
4954
|
size: "small",
|
|
4955
4955
|
onClick: l[11] ||= (e) => t.$emit("assemble")
|
|
4956
4956
|
}, {
|
|
@@ -4965,7 +4965,7 @@ var $i = class extends Je {
|
|
|
4965
4965
|
onMouseenter: (n) => t.$emit("highlight", e.id),
|
|
4966
4966
|
onMouseleave: l[12] ||= (e) => t.$emit("clear-highlight")
|
|
4967
4967
|
}, [
|
|
4968
|
-
s(
|
|
4968
|
+
s(oe, {
|
|
4969
4969
|
"model-value": e.visible,
|
|
4970
4970
|
onChange: (n) => t.$emit("toggle-visibility", e.id)
|
|
4971
4971
|
}, null, 8, ["model-value", "onChange"]),
|
|
@@ -4973,7 +4973,7 @@ var $i = class extends Je {
|
|
|
4973
4973
|
class: "part-color",
|
|
4974
4974
|
style: f({ background: "#" + e.color.getHexString() })
|
|
4975
4975
|
}, null, 4),
|
|
4976
|
-
s(
|
|
4976
|
+
s(ie, {
|
|
4977
4977
|
modelValue: e.name,
|
|
4978
4978
|
"onUpdate:modelValue": (t) => e.name = t,
|
|
4979
4979
|
size: "small",
|
|
@@ -4984,7 +4984,7 @@ var $i = class extends Je {
|
|
|
4984
4984
|
"onUpdate:modelValue",
|
|
4985
4985
|
"onChange"
|
|
4986
4986
|
]),
|
|
4987
|
-
s(
|
|
4987
|
+
s(se, {
|
|
4988
4988
|
"model-value": "#" + e.color.getHexString(),
|
|
4989
4989
|
size: "small",
|
|
4990
4990
|
onChange: (n) => t.$emit("color-change", e.id, n)
|
|
@@ -4997,7 +4997,7 @@ var $i = class extends Je {
|
|
|
4997
4997
|
//#endregion
|
|
4998
4998
|
//#region ../../src/composables/useExplosionCollaboration.js
|
|
4999
4999
|
function Ma(e, { roomPrefix: t, syncKey: n = "_data" } = {}) {
|
|
5000
|
-
let r = new
|
|
5000
|
+
let r = new It.Doc(), i = _(!1), a = _(!1), o = _(!1), s = _(!1), c = _([]), l = null, u = null, d = null, f = null, p = !1, h = null, g = `ws://${window.location.hostname || "localhost"}:1234`, v = `${t}-${e}`, y = () => {
|
|
5001
5001
|
b(), h = setInterval(() => {
|
|
5002
5002
|
if (l && l.connection && l.connection.ws && l.connection.ws.readyState === WebSocket.CLOSED) try {
|
|
5003
5003
|
l.connect();
|
|
@@ -5008,7 +5008,7 @@ function Ma(e, { roomPrefix: t, syncKey: n = "_data" } = {}) {
|
|
|
5008
5008
|
}, b = () => {
|
|
5009
5009
|
h &&= (clearInterval(h), null);
|
|
5010
5010
|
};
|
|
5011
|
-
l = new
|
|
5011
|
+
l = new Lt({
|
|
5012
5012
|
url: g,
|
|
5013
5013
|
name: v,
|
|
5014
5014
|
document: r,
|
|
@@ -5176,18 +5176,18 @@ function Ia(e, t) {
|
|
|
5176
5176
|
let n = d.getX(e), r = d.getX(e + 1), i = d.getX(e + 2);
|
|
5177
5177
|
t.includes(n) && t.includes(r) && t.includes(i) && c.push(l.get(n), l.get(r), l.get(i));
|
|
5178
5178
|
}
|
|
5179
|
-
let f = new
|
|
5180
|
-
return f.setAttribute("position", new
|
|
5179
|
+
let f = new z.BufferGeometry();
|
|
5180
|
+
return f.setAttribute("position", new z.Float32BufferAttribute(a, 3)), o.length && f.setAttribute("normal", new z.Float32BufferAttribute(o, 3)), s.length && f.setAttribute("uv", new z.Float32BufferAttribute(s, 2)), c.length && f.setIndex(c), f.computeBoundingBox(), f.computeBoundingSphere(), f;
|
|
5181
5181
|
}
|
|
5182
5182
|
function La(e) {
|
|
5183
|
-
let t = new
|
|
5183
|
+
let t = new z.Box3().setFromBufferAttribute(e.getAttribute("position")), n = new z.Vector3();
|
|
5184
5184
|
return t.getCenter(n), n;
|
|
5185
5185
|
}
|
|
5186
5186
|
function Ra(e) {
|
|
5187
|
-
return new
|
|
5187
|
+
return new z.Box3().setFromBufferAttribute(e.getAttribute("position"));
|
|
5188
5188
|
}
|
|
5189
5189
|
function za() {
|
|
5190
|
-
let e = g([]), t = _([]), n = _(!1), r = _(0), i = _(new
|
|
5190
|
+
let e = g([]), t = _([]), n = _(!1), r = _(0), i = _(new z.Vector3(0, 0, 0)), a = _("radial"), o = _(new z.Vector3(0, 0, 0)), s = _(1), c = (n) => {
|
|
5191
5191
|
e.length = 0;
|
|
5192
5192
|
let r = [];
|
|
5193
5193
|
if (n.traverse((e) => {
|
|
@@ -5198,7 +5198,7 @@ function za() {
|
|
|
5198
5198
|
let n = t.geometry.index ? t.geometry : t.geometry.toNonIndexed();
|
|
5199
5199
|
Fa(n).forEach((r) => {
|
|
5200
5200
|
if (r.length < 3) return;
|
|
5201
|
-
let i = Ia(n, r), o = La(i), s = Ra(i), c = new
|
|
5201
|
+
let i = Ia(n, r), o = La(i), s = Ra(i), c = new z.Matrix4();
|
|
5202
5202
|
t.updateWorldMatrix(!0, !1), c.copy(t.matrixWorld), o.applyMatrix4(c), e.push({
|
|
5203
5203
|
id: `part_${a}`,
|
|
5204
5204
|
name: `零件 ${a + 1}`,
|
|
@@ -5207,21 +5207,21 @@ function za() {
|
|
|
5207
5207
|
currentCentroid: o.clone(),
|
|
5208
5208
|
originalPosition: t.position.clone(),
|
|
5209
5209
|
bbox: s,
|
|
5210
|
-
color: t.material.color ? t.material.color.clone() : new
|
|
5210
|
+
color: t.material.color ? t.material.color.clone() : new z.Color(4235007),
|
|
5211
5211
|
material: t.material.clone(),
|
|
5212
5212
|
visible: !0,
|
|
5213
5213
|
opacity: 1,
|
|
5214
|
-
explodedOffset: new
|
|
5214
|
+
explodedOffset: new z.Vector3(0, 0, 0)
|
|
5215
5215
|
}), a++;
|
|
5216
5216
|
});
|
|
5217
5217
|
}), e.length > 0) {
|
|
5218
|
-
let n = new
|
|
5219
|
-
e.forEach((e) => n.expandByPoint(e.originalCentroid)), n.getCenter(o.value), s.value = n.getSize(new
|
|
5218
|
+
let n = new z.Box3();
|
|
5219
|
+
e.forEach((e) => n.expandByPoint(e.originalCentroid)), n.getCenter(o.value), s.value = n.getSize(new z.Vector3()).length() / 2, i.value.copy(o.value), t.value = e.map((e) => e.originalCentroid.clone());
|
|
5220
5220
|
}
|
|
5221
5221
|
}, l = (t, n) => {
|
|
5222
5222
|
let r = i.value, a = s.value * 1.5;
|
|
5223
5223
|
e.forEach((i) => {
|
|
5224
|
-
let o = new
|
|
5224
|
+
let o = new z.Vector3().subVectors(i.originalCentroid, r);
|
|
5225
5225
|
switch (o.length() < .001 && o.set(0, 1, 0), o.normalize(), t) {
|
|
5226
5226
|
case "radial":
|
|
5227
5227
|
i.explodedOffset.copy(o).multiplyScalar(a * n);
|
|
@@ -5278,18 +5278,18 @@ function za() {
|
|
|
5278
5278
|
setPartOpacity: v,
|
|
5279
5279
|
highlightPart: (t) => {
|
|
5280
5280
|
e.forEach((e) => {
|
|
5281
|
-
e.id === t ? e.material.emissive = new
|
|
5281
|
+
e.id === t ? e.material.emissive = new z.Color(4473924) : e.material.emissive = new z.Color(0);
|
|
5282
5282
|
});
|
|
5283
5283
|
},
|
|
5284
5284
|
clearHighlight: () => {
|
|
5285
5285
|
e.forEach((e) => {
|
|
5286
|
-
e.material.emissive = new
|
|
5286
|
+
e.material.emissive = new z.Color(0);
|
|
5287
5287
|
});
|
|
5288
5288
|
},
|
|
5289
5289
|
createExplosionMesh: () => {
|
|
5290
|
-
let t = new
|
|
5290
|
+
let t = new z.Group();
|
|
5291
5291
|
return t.name = "explosion_model", e.forEach((e) => {
|
|
5292
|
-
let n = new
|
|
5292
|
+
let n = new z.Mesh(e.geometry, e.material);
|
|
5293
5293
|
n.name = e.id, n.position.copy(e.explodedOffset), n.userData = {
|
|
5294
5294
|
partId: e.id,
|
|
5295
5295
|
partName: e.name
|
|
@@ -5631,31 +5631,66 @@ function Va() {
|
|
|
5631
5631
|
var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = { class: "side-panel" }, Ga = { class: "panel-section" }, Ka = ["onClick"], qa = { class: "mesh-name" }, Ja = {
|
|
5632
5632
|
key: 0,
|
|
5633
5633
|
class: "panel-section"
|
|
5634
|
-
}, Ya = { class: "prop-row" }, Xa = { class: "prop-row" }, Za = { class: "prop-row" }, Qa = { class: "prop-row" }, $a = { class: "prop-row" }, eo = { class: "prop-row" }, to = { class: "prop-row" }, no = { class: "prop-row" }, ro = { class: "panel-section" }, io = { class: "prop-row" }, ao = "explosion-3d", oo = /*#__PURE__*/
|
|
5634
|
+
}, Ya = { class: "prop-row" }, Xa = { class: "prop-row" }, Za = { class: "prop-row" }, Qa = { class: "prop-row" }, $a = { class: "prop-row" }, eo = { class: "prop-row" }, to = { class: "prop-row" }, no = { class: "prop-row" }, ro = { class: "panel-section" }, io = { class: "prop-row" }, ao = "explosion-3d", oo = /*#__PURE__*/ Bt({
|
|
5635
5635
|
__name: "Explosion3dEditor",
|
|
5636
|
+
props: {
|
|
5637
|
+
docId: {
|
|
5638
|
+
type: [Number, String],
|
|
5639
|
+
default: null
|
|
5640
|
+
},
|
|
5641
|
+
apiBase: {
|
|
5642
|
+
type: String,
|
|
5643
|
+
default: "/api"
|
|
5644
|
+
},
|
|
5645
|
+
saveApi: {
|
|
5646
|
+
type: [String, Function],
|
|
5647
|
+
default: null
|
|
5648
|
+
},
|
|
5649
|
+
loadApi: {
|
|
5650
|
+
type: [String, Function],
|
|
5651
|
+
default: null
|
|
5652
|
+
},
|
|
5653
|
+
wsUrl: {
|
|
5654
|
+
type: String,
|
|
5655
|
+
default: ""
|
|
5656
|
+
},
|
|
5657
|
+
user: {
|
|
5658
|
+
type: Object,
|
|
5659
|
+
default: null
|
|
5660
|
+
},
|
|
5661
|
+
uiConfig: {
|
|
5662
|
+
type: Object,
|
|
5663
|
+
default: () => ({})
|
|
5664
|
+
}
|
|
5665
|
+
},
|
|
5636
5666
|
setup(o) {
|
|
5637
|
-
let c =
|
|
5667
|
+
let c = o, l = t(() => ({
|
|
5668
|
+
backButton: "show",
|
|
5669
|
+
titleEditable: !0,
|
|
5670
|
+
authorEditable: !0,
|
|
5671
|
+
...c.uiConfig
|
|
5672
|
+
})), u = t(() => c.docId ?? T.params.id), T = O(), D = k(), j = _(c.docId ?? null), M = _(null), ee = _(null), te = _(null), N = _(!1), ne = _(!1), { saveVersion: re } = hn(), P = fn(), F = g({
|
|
5638
5673
|
title: "3D爆炸图",
|
|
5639
5674
|
meshes: []
|
|
5640
|
-
}),
|
|
5641
|
-
let n =
|
|
5642
|
-
return !n || !n.parentId ? !1 : n.parentId === t ? !0 :
|
|
5643
|
-
},
|
|
5644
|
-
|
|
5645
|
-
}, ze = async () => {
|
|
5646
|
-
Ie && await je(Ie) && Te.value && (A.success("3D模型生成成功,正在加载..."), Ve(Te.value));
|
|
5675
|
+
}), I = _(!1), ie = _(!1), ae = _(!1), L = null, oe = _(null), se = _(0), ce = _("radial"), le = _(/* @__PURE__ */ new Set()), ue = 0, { parts: de, isExploded: fe, explosionFactor: pe, explosionStyle: me, analyzeModel: z, explode: he, assemble: ge, setPartColor: _e, setPartLabel: B, togglePartVisibility: ve, highlightPart: ye, clearHighlight: be, createExplosionMesh: xe, exportPartsConfig: Se } = za(), { isGenerating: Ce, generationProgress: V, generationStatus: we, generatedModelUrl: Te, error: Ee, provider: De, apiKey: Oe, API_PROVIDERS: ke, setProvider: Ae, setApiKey: je, generateFromImage: Me, clearResult: Ne } = Va(), H = t(() => F.meshes.find((e) => e.id === oe.value)), Pe = t(() => H.value ? F.meshes.filter((e) => e.id !== oe.value && !Fe(e.id, H.value.id)) : []), Fe = (e, t) => {
|
|
5676
|
+
let n = F.meshes.find((t) => t.id === e);
|
|
5677
|
+
return !n || !n.parentId ? !1 : n.parentId === t ? !0 : Fe(n.parentId, t);
|
|
5678
|
+
}, Ie = (e) => F.meshes.filter((t) => t.parentId === e), Le = null, Re = _(!1), ze = (e) => {
|
|
5679
|
+
Le = e;
|
|
5647
5680
|
}, Be = async () => {
|
|
5648
|
-
|
|
5649
|
-
|
|
5650
|
-
|
|
5651
|
-
|
|
5681
|
+
Le && await Me(Le) && Te.value && (A.success("3D模型生成成功,正在加载..."), He(Te.value));
|
|
5682
|
+
}, Ve = async () => {
|
|
5683
|
+
if (!Le) return;
|
|
5684
|
+
let e = await generateBoth(Le);
|
|
5685
|
+
e && (e.fast && (A.success("快速预览模型已生成"), He(e.fast)), e.quality && e.quality !== e.fast && setTimeout(() => {
|
|
5686
|
+
A.info("高质量模型已生成,正在替换..."), He(e.quality);
|
|
5652
5687
|
}, 1e3));
|
|
5653
|
-
},
|
|
5688
|
+
}, He = async (e) => {
|
|
5654
5689
|
try {
|
|
5655
|
-
let { GLTFLoader: t } = await Promise.resolve().then(() =>
|
|
5690
|
+
let { GLTFLoader: t } = await Promise.resolve().then(() => Hr);
|
|
5656
5691
|
new t().load(e, (e) => {
|
|
5657
5692
|
let t = e.scene;
|
|
5658
|
-
|
|
5693
|
+
z(t), de.forEach((e) => {
|
|
5659
5694
|
let t = {
|
|
5660
5695
|
id: "auto_" + Date.now() + "_" + Math.random().toString(36).substr(2, 4),
|
|
5661
5696
|
label: e.name,
|
|
@@ -5669,27 +5704,27 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
5669
5704
|
parentId: null,
|
|
5670
5705
|
animSpeed: 1
|
|
5671
5706
|
};
|
|
5672
|
-
|
|
5673
|
-
}),
|
|
5707
|
+
F.meshes.push(t);
|
|
5708
|
+
}), Re.value = !0, dt(), A.success(`已识别 ${de.length} 个零件`);
|
|
5674
5709
|
}, void 0, (e) => {
|
|
5675
5710
|
A.error("模型加载失败: " + e.message);
|
|
5676
5711
|
});
|
|
5677
5712
|
} catch (e) {
|
|
5678
5713
|
A.error("加载模型失败: " + e.message);
|
|
5679
5714
|
}
|
|
5680
|
-
}, He = (e) => {
|
|
5681
|
-
me(e);
|
|
5682
5715
|
}, Ue = (e) => {
|
|
5683
|
-
|
|
5684
|
-
}, We = () => {
|
|
5685
|
-
me
|
|
5716
|
+
he(e);
|
|
5717
|
+
}, We = (e) => {
|
|
5718
|
+
me.value = e;
|
|
5686
5719
|
}, Ge = () => {
|
|
5687
|
-
he();
|
|
5688
|
-
}, Ke = (
|
|
5720
|
+
he(1);
|
|
5721
|
+
}, Ke = () => {
|
|
5722
|
+
ge();
|
|
5723
|
+
}, qe = (e) => {
|
|
5689
5724
|
ye(e);
|
|
5690
|
-
},
|
|
5691
|
-
|
|
5692
|
-
},
|
|
5725
|
+
}, Je = () => {
|
|
5726
|
+
be();
|
|
5727
|
+
}, Ye = {
|
|
5693
5728
|
cube: {
|
|
5694
5729
|
label: "立方体",
|
|
5695
5730
|
shape: "cube",
|
|
@@ -5810,7 +5845,7 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
5810
5845
|
scale: 1,
|
|
5811
5846
|
color: "#f56c6c"
|
|
5812
5847
|
}
|
|
5813
|
-
},
|
|
5848
|
+
}, Xe = [
|
|
5814
5849
|
{
|
|
5815
5850
|
id: "cube",
|
|
5816
5851
|
name: "立方体",
|
|
@@ -5961,27 +5996,27 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
5961
5996
|
shape: "endCap",
|
|
5962
5997
|
scale: 1
|
|
5963
5998
|
}
|
|
5964
|
-
],
|
|
5999
|
+
], Ze = (e) => {
|
|
5965
6000
|
if (e === "upload") {
|
|
5966
|
-
|
|
6001
|
+
ee.value?.click();
|
|
5967
6002
|
return;
|
|
5968
6003
|
}
|
|
5969
|
-
let t =
|
|
6004
|
+
let t = Ye[e];
|
|
5970
6005
|
if (!t) return;
|
|
5971
|
-
let n =
|
|
5972
|
-
|
|
5973
|
-
id: `mesh-${++
|
|
6006
|
+
let n = F.meshes.length * (Math.PI * 2 / Math.max(F.meshes.length + 1, 4)), r = 2 + F.meshes.length * .5;
|
|
6007
|
+
F.meshes.push({
|
|
6008
|
+
id: `mesh-${++ue}-${Date.now()}`,
|
|
5974
6009
|
...t,
|
|
5975
6010
|
notes: "",
|
|
5976
6011
|
parentId: null,
|
|
5977
6012
|
x: Math.cos(n) * r,
|
|
5978
6013
|
y: .5,
|
|
5979
6014
|
z: Math.sin(n) * r
|
|
5980
|
-
}),
|
|
5981
|
-
},
|
|
5982
|
-
let t =
|
|
5983
|
-
|
|
5984
|
-
id: `mesh-${++
|
|
6015
|
+
}), dt();
|
|
6016
|
+
}, U = (e) => {
|
|
6017
|
+
let t = F.meshes.length * (Math.PI * 2 / Math.max(F.meshes.length + 1, 4)), n = 2 + F.meshes.length * .5;
|
|
6018
|
+
F.meshes.push({
|
|
6019
|
+
id: `mesh-${++ue}-${Date.now()}`,
|
|
5985
6020
|
label: e.name,
|
|
5986
6021
|
shape: e.shape,
|
|
5987
6022
|
scale: e.scale,
|
|
@@ -5991,25 +6026,27 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
5991
6026
|
x: Math.cos(t) * n,
|
|
5992
6027
|
y: .5,
|
|
5993
6028
|
z: Math.sin(t) * n
|
|
5994
|
-
}),
|
|
6029
|
+
}), dt();
|
|
5995
6030
|
}, Qe = (e) => {
|
|
5996
|
-
|
|
6031
|
+
M.value && (e.endsWith(".obj") ? M.value.loadOBJ(e) : M.value.loadGLTF(e));
|
|
5997
6032
|
}, $e = (e) => {
|
|
5998
|
-
|
|
5999
|
-
},
|
|
6000
|
-
let i =
|
|
6001
|
-
i && (i.x = t, i.y = n, i.z = r,
|
|
6002
|
-
}, et = (e) => {
|
|
6003
|
-
N.meshes.find((t) => t.id === e) && Fe(e).length > 0 && (T.value?.toggleExpand(e), se.value.has(e) ? se.value.delete(e) : se.value.add(e));
|
|
6033
|
+
oe.value = e;
|
|
6034
|
+
}, et = ({ id: e, x: t, y: n, z: r }) => {
|
|
6035
|
+
let i = F.meshes.find((t) => t.id === e);
|
|
6036
|
+
i && (i.x = t, i.y = n, i.z = r, dt());
|
|
6004
6037
|
}, tt = (e) => {
|
|
6005
|
-
|
|
6038
|
+
F.meshes.find((t) => t.id === e) && Ie(e).length > 0 && (M.value?.toggleExpand(e), le.value.has(e) ? le.value.delete(e) : le.value.add(e));
|
|
6039
|
+
}, nt = (e) => {
|
|
6040
|
+
F.meshes.forEach((t) => {
|
|
6006
6041
|
t.parentId === e && (t.parentId = null);
|
|
6007
|
-
}),
|
|
6008
|
-
}, nt = () => {
|
|
6009
|
-
ae.value = Math.min(5, ae.value + 1);
|
|
6042
|
+
}), F.meshes = F.meshes.filter((t) => t.id !== e), oe.value === e && (oe.value = null), dt();
|
|
6010
6043
|
}, rt = () => {
|
|
6011
|
-
|
|
6012
|
-
}, it = () =>
|
|
6044
|
+
se.value = Math.min(5, se.value + 1);
|
|
6045
|
+
}, it = () => {
|
|
6046
|
+
se.value = Math.max(0, se.value - 1);
|
|
6047
|
+
}, at = () => {
|
|
6048
|
+
c.docId ?? D.push("/");
|
|
6049
|
+
}, ot = [
|
|
6013
6050
|
"我可以帮您优化3D爆炸图、检查模型结构,或者提供装配动画建议。请问有什么需要帮助的?",
|
|
6014
6051
|
"这个3D爆炸图的模型摆放很合理。建议调整爆炸距离,让各部件层次更加分明。",
|
|
6015
6052
|
"根据当前的3D模型结构,我建议为关键部件添加材质和颜色区分,提高视觉效果。",
|
|
@@ -6018,103 +6055,111 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
6018
6055
|
"3D爆炸图的交互体验不错。如果需要,我可以帮您优化相机角度和光照设置。",
|
|
6019
6056
|
"我可以帮您分析模型文件的格式兼容性,建议使用glTF格式获得更好的Web性能。",
|
|
6020
6057
|
"建议为3D爆炸图添加动画过渡效果,让装配过程的展示更加流畅自然。"
|
|
6021
|
-
],
|
|
6022
|
-
let n =
|
|
6023
|
-
await
|
|
6058
|
+
], st = async (e, t = {}) => {
|
|
6059
|
+
let n = j.value ? `${ao}-${j.value}` : null;
|
|
6060
|
+
await P.sendMessage(e, {
|
|
6024
6061
|
...t,
|
|
6025
6062
|
roomId: n
|
|
6026
6063
|
});
|
|
6027
|
-
let r = t.mentionedUser, i = r && r.toLowerCase().includes("ai"), a =
|
|
6028
|
-
(!r || i || a.length === 0) && (
|
|
6029
|
-
|
|
6064
|
+
let r = t.mentionedUser, i = r && r.toLowerCase().includes("ai"), a = P.collabUsers.value.filter((e) => e.name !== P.currentUser.value.name);
|
|
6065
|
+
(!r || i || a.length === 0) && (P.loading.value = !0, setTimeout(() => {
|
|
6066
|
+
P.sendAiMessage(ot[Math.floor(Math.random() * ot.length)], n), P.loading.value = !1;
|
|
6030
6067
|
}, 800 + Math.random() * 1200));
|
|
6031
|
-
}, st = () => {
|
|
6032
|
-
let e = u.value ? `${ao}-${u.value}` : null;
|
|
6033
|
-
M.clearMessages(e);
|
|
6034
6068
|
}, ct = () => {
|
|
6035
|
-
|
|
6069
|
+
let e = j.value ? `${ao}-${j.value}` : null;
|
|
6070
|
+
P.clearMessages(e);
|
|
6071
|
+
}, lt = () => {
|
|
6072
|
+
if (!j.value) {
|
|
6036
6073
|
A.warning("请先保存文档");
|
|
6037
6074
|
return;
|
|
6038
6075
|
}
|
|
6039
|
-
|
|
6040
|
-
},
|
|
6076
|
+
ne.value = !0;
|
|
6077
|
+
}, ut = (e) => {
|
|
6041
6078
|
try {
|
|
6042
6079
|
let t = typeof e == "string" ? JSON.parse(e) : e;
|
|
6043
|
-
t.title && (
|
|
6080
|
+
t.title && (F.title = t.title), t.explodeStyle && (ce.value = t.explodeStyle), t.meshes && (F.meshes = t.meshes.map((e) => ({
|
|
6044
6081
|
notes: "",
|
|
6045
6082
|
parentId: null,
|
|
6046
6083
|
...e
|
|
6047
|
-
}))),
|
|
6084
|
+
}))), oe.value = null;
|
|
6048
6085
|
} catch (e) {
|
|
6049
6086
|
console.error("Version apply error:", e);
|
|
6050
6087
|
}
|
|
6051
|
-
},
|
|
6052
|
-
|
|
6088
|
+
}, dt = () => {
|
|
6089
|
+
I.value && L && L.pushToYjs(F);
|
|
6053
6090
|
};
|
|
6054
|
-
C(
|
|
6055
|
-
|
|
6091
|
+
C(H, () => {
|
|
6092
|
+
dt();
|
|
6056
6093
|
}, { deep: !0 });
|
|
6057
|
-
let
|
|
6094
|
+
let ft = () => ({
|
|
6058
6095
|
version: "1.0",
|
|
6059
|
-
title:
|
|
6060
|
-
explodeStyle:
|
|
6061
|
-
meshes:
|
|
6062
|
-
}),
|
|
6063
|
-
if (
|
|
6096
|
+
title: F.title,
|
|
6097
|
+
explodeStyle: ce.value,
|
|
6098
|
+
meshes: F.meshes.map((e) => ({ ...e }))
|
|
6099
|
+
}), pt = async () => {
|
|
6100
|
+
if (I.value && L?.collaborationClosed.value && !ae.value) {
|
|
6064
6101
|
A.warning("协作已关闭,无法保存");
|
|
6065
6102
|
return;
|
|
6066
6103
|
}
|
|
6067
6104
|
try {
|
|
6068
6105
|
let e = {
|
|
6069
|
-
title:
|
|
6106
|
+
title: F.title,
|
|
6070
6107
|
view_type: "model3d",
|
|
6071
|
-
config: JSON.stringify(
|
|
6108
|
+
config: JSON.stringify(ft())
|
|
6072
6109
|
};
|
|
6073
|
-
|
|
6074
|
-
|
|
6110
|
+
if (j.value) typeof c.saveApi == "function" ? await c.saveApi(e, j.value) : c.saveApi ? await R.put(`${c.saveApi}/${j.value}`, e) : await R.put(`${c.apiBase}/explosion-views/${j.value}`, e);
|
|
6111
|
+
else {
|
|
6112
|
+
let t;
|
|
6113
|
+
t = typeof c.saveApi == "function" ? await c.saveApi(e) : c.saveApi ? await R.post(c.saveApi, e) : await R.post(`${c.apiBase}/explosion-views/`, e), j.value = t.data.id;
|
|
6114
|
+
}
|
|
6115
|
+
A.success("保存成功"), re({
|
|
6116
|
+
documentId: j.value,
|
|
6075
6117
|
docType: "model3d",
|
|
6076
|
-
content: JSON.stringify(
|
|
6077
|
-
userId: String(
|
|
6078
|
-
userName:
|
|
6118
|
+
content: JSON.stringify(ft()),
|
|
6119
|
+
userId: String(P.currentUser.value?.id || ""),
|
|
6120
|
+
userName: c.user?.name || P.currentUser.value?.name || "未知"
|
|
6079
6121
|
});
|
|
6080
6122
|
} catch {
|
|
6081
6123
|
A.error("保存失败");
|
|
6082
6124
|
}
|
|
6083
|
-
},
|
|
6084
|
-
|
|
6085
|
-
|
|
6086
|
-
|
|
6087
|
-
|
|
6088
|
-
|
|
6125
|
+
}, mt = async () => {
|
|
6126
|
+
let e = u.value;
|
|
6127
|
+
if (e) try {
|
|
6128
|
+
let t;
|
|
6129
|
+
t = typeof c.loadApi == "function" ? await c.loadApi(e) : c.loadApi ? await R.get(`${c.loadApi}/${e}`) : await R.get(`${c.apiBase}/explosion-views/${e}`);
|
|
6130
|
+
let n = t.data;
|
|
6131
|
+
if (j.value = n.id, F.title = n.title, n.config) {
|
|
6132
|
+
let e = JSON.parse(n.config);
|
|
6133
|
+
F.meshes = (e.meshes || []).map((e) => ({
|
|
6089
6134
|
notes: "",
|
|
6090
6135
|
parentId: null,
|
|
6091
6136
|
...e
|
|
6092
|
-
})),
|
|
6137
|
+
})), ce.value = e.explodeStyle || "radial";
|
|
6093
6138
|
}
|
|
6094
6139
|
} catch (e) {
|
|
6095
6140
|
console.error(e);
|
|
6096
6141
|
}
|
|
6097
6142
|
else {
|
|
6098
|
-
let e =
|
|
6099
|
-
|
|
6100
|
-
id: `mesh-${++
|
|
6143
|
+
let e = Ye.cube;
|
|
6144
|
+
F.meshes.push({
|
|
6145
|
+
id: `mesh-${++ue}`,
|
|
6101
6146
|
...e,
|
|
6102
6147
|
notes: "",
|
|
6103
6148
|
parentId: null,
|
|
6104
6149
|
x: 0,
|
|
6105
6150
|
y: .5,
|
|
6106
6151
|
z: 0
|
|
6107
|
-
}),
|
|
6108
|
-
id: `mesh-${++
|
|
6109
|
-
...
|
|
6152
|
+
}), F.meshes.push({
|
|
6153
|
+
id: `mesh-${++ue}`,
|
|
6154
|
+
...Ye.sphere,
|
|
6110
6155
|
notes: "",
|
|
6111
6156
|
parentId: null,
|
|
6112
6157
|
x: 2,
|
|
6113
6158
|
y: .5,
|
|
6114
6159
|
z: 0
|
|
6115
|
-
}),
|
|
6116
|
-
id: `mesh-${++
|
|
6117
|
-
...
|
|
6160
|
+
}), F.meshes.push({
|
|
6161
|
+
id: `mesh-${++ue}`,
|
|
6162
|
+
...Ye.cylinder,
|
|
6118
6163
|
notes: "",
|
|
6119
6164
|
parentId: null,
|
|
6120
6165
|
x: 0,
|
|
@@ -6122,19 +6167,19 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
6122
6167
|
z: 2
|
|
6123
6168
|
});
|
|
6124
6169
|
}
|
|
6125
|
-
},
|
|
6170
|
+
}, ht = (e) => {
|
|
6126
6171
|
if (e === "png") {
|
|
6127
6172
|
let e = document.querySelector(".viewport-container canvas");
|
|
6128
6173
|
e && e.toBlob((e) => {
|
|
6129
6174
|
let t = document.createElement("a");
|
|
6130
|
-
t.href = URL.createObjectURL(e), t.download = `${
|
|
6175
|
+
t.href = URL.createObjectURL(e), t.download = `${F.title || "3D爆炸图"}.png`, t.click();
|
|
6131
6176
|
});
|
|
6132
|
-
} else e === "json" ?
|
|
6133
|
-
}, ht = () => {
|
|
6134
|
-
let e = dt(), t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), n = document.createElement("a");
|
|
6135
|
-
n.href = URL.createObjectURL(t), n.download = `${N.title || "3D爆炸图"}.json`, n.click(), A.success("JSON导出成功");
|
|
6177
|
+
} else e === "json" ? gt() : e === "html" ? vt() : A.info(`导出 ${e} 开发中`);
|
|
6136
6178
|
}, gt = () => {
|
|
6137
|
-
|
|
6179
|
+
let e = ft(), t = new Blob([JSON.stringify(e, null, 2)], { type: "application/json" }), n = document.createElement("a");
|
|
6180
|
+
n.href = URL.createObjectURL(t), n.download = `${F.title || "3D爆炸图"}.json`, n.click(), A.success("JSON导出成功");
|
|
6181
|
+
}, W = () => {
|
|
6182
|
+
te.value?.click();
|
|
6138
6183
|
}, _t = (e) => {
|
|
6139
6184
|
let t = e.target.files?.[0];
|
|
6140
6185
|
if (!t) return;
|
|
@@ -6142,17 +6187,17 @@ var Ha = { class: "explosion-3d-editor" }, Ua = { class: "editor-body" }, Wa = {
|
|
|
6142
6187
|
n.onload = (e) => {
|
|
6143
6188
|
try {
|
|
6144
6189
|
let t = JSON.parse(e.target.result);
|
|
6145
|
-
|
|
6190
|
+
F.title = t.title || "3D爆炸图", ce.value = t.explodeStyle || "radial", F.meshes = (t.meshes || []).map((e) => ({
|
|
6146
6191
|
notes: "",
|
|
6147
6192
|
parentId: null,
|
|
6148
6193
|
...e
|
|
6149
|
-
})),
|
|
6194
|
+
})), oe.value = null, dt(), A.success("JSON导入成功");
|
|
6150
6195
|
} catch {
|
|
6151
6196
|
A.error("JSON文件格式错误");
|
|
6152
6197
|
}
|
|
6153
6198
|
}, n.readAsText(t), e.target.value = "";
|
|
6154
6199
|
}, vt = () => {
|
|
6155
|
-
let e =
|
|
6200
|
+
let e = ft(), t = JSON.stringify(e.meshes), n = `<!DOCTYPE html>
|
|
6156
6201
|
<html lang="zh-CN">
|
|
6157
6202
|
<head>
|
|
6158
6203
|
<meta charset="UTF-8">
|
|
@@ -6344,97 +6389,97 @@ animate();
|
|
|
6344
6389
|
<\/script>
|
|
6345
6390
|
</body>
|
|
6346
6391
|
</html>`, r = new Blob([n], { type: "text/html" }), i = document.createElement("a");
|
|
6347
|
-
i.href = URL.createObjectURL(r), i.download = `${
|
|
6348
|
-
},
|
|
6392
|
+
i.href = URL.createObjectURL(r), i.download = `${F.title || "3D爆炸图"}.html`, i.click(), A.success("HTML导出成功");
|
|
6393
|
+
}, yt = async (e) => {
|
|
6349
6394
|
let t = e.target.files?.[0];
|
|
6350
6395
|
if (!t) return;
|
|
6351
6396
|
let n = new FormData();
|
|
6352
6397
|
n.append("file", t);
|
|
6353
6398
|
try {
|
|
6354
|
-
let e = await
|
|
6355
|
-
i === "gltf" || i === "glb" ?
|
|
6399
|
+
let e = await R.post(`${c.apiBase}/files/upload/image`, n), r = e.data.url || e.data.file_path, i = t.name.split(".").pop().toLowerCase();
|
|
6400
|
+
i === "gltf" || i === "glb" ? M.value?.loadGLTF(r) : i === "obj" && M.value?.loadOBJ(r), A.success("模型加载成功");
|
|
6356
6401
|
} catch {
|
|
6357
6402
|
A.error("模型上传失败");
|
|
6358
6403
|
}
|
|
6359
|
-
},
|
|
6360
|
-
|
|
6361
|
-
e.title && (
|
|
6404
|
+
}, bt = (e) => {
|
|
6405
|
+
L &&= (L.destroy(), null), L = Na(e, { onRemoteChange: (e) => {
|
|
6406
|
+
e.title && (F.title = e.title), e.meshes && (F.meshes = (e.meshes || []).map((e) => ({
|
|
6362
6407
|
notes: "",
|
|
6363
6408
|
parentId: null,
|
|
6364
6409
|
...e
|
|
6365
6410
|
})));
|
|
6366
|
-
} }),
|
|
6367
|
-
},
|
|
6368
|
-
if (
|
|
6369
|
-
if (!
|
|
6411
|
+
} }), L._setSyncReady(!1);
|
|
6412
|
+
}, xt = async () => {
|
|
6413
|
+
if (I.value) return;
|
|
6414
|
+
if (!j.value && (await pt(), !j.value)) {
|
|
6370
6415
|
A.error("请先保存文档");
|
|
6371
6416
|
return;
|
|
6372
6417
|
}
|
|
6373
|
-
|
|
6418
|
+
bt(String(j.value)), L.connect();
|
|
6374
6419
|
let e = {
|
|
6375
|
-
name: `用户${Math.floor(Math.random() * 1e3)}`,
|
|
6376
|
-
color: `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`
|
|
6420
|
+
name: c.user?.name || `用户${Math.floor(Math.random() * 1e3)}`,
|
|
6421
|
+
color: c.user?.color || `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`
|
|
6377
6422
|
}, t = () => {
|
|
6378
|
-
if (
|
|
6379
|
-
|
|
6380
|
-
let t =
|
|
6381
|
-
t ? (t.title && (
|
|
6423
|
+
if (L.provider && L.provider.synced) {
|
|
6424
|
+
L._setSyncReady(!0), L.setLocalUser(e);
|
|
6425
|
+
let t = L.pullFromYjs();
|
|
6426
|
+
t ? (t.title && (F.title = t.title), t.meshes && (F.meshes = (t.meshes || []).map((e) => ({
|
|
6382
6427
|
notes: "",
|
|
6383
6428
|
parentId: null,
|
|
6384
6429
|
...e
|
|
6385
|
-
})))) :
|
|
6386
|
-
ydoc:
|
|
6387
|
-
provider:
|
|
6388
|
-
onlineUsers:
|
|
6389
|
-
}),
|
|
6390
|
-
id:
|
|
6430
|
+
})))) : F.meshes.length > 0 && L.pushToYjs(F), I.value = !0, ae.value = !0, ie.value = !1, P.setCollabContext({
|
|
6431
|
+
ydoc: L.ydoc,
|
|
6432
|
+
provider: L.provider,
|
|
6433
|
+
onlineUsers: L.onlineUsers
|
|
6434
|
+
}), P.setCurrentUser({
|
|
6435
|
+
id: L.provider.awareness.clientID,
|
|
6391
6436
|
name: e.name,
|
|
6392
6437
|
color: e.color
|
|
6393
6438
|
}), A.success("协作已开启");
|
|
6394
6439
|
} else setTimeout(t, 100);
|
|
6395
6440
|
};
|
|
6396
6441
|
setTimeout(t, 200);
|
|
6397
|
-
}, xt = () => {
|
|
6398
|
-
F && (F.closeCollaboration(), P.value = !1, ie.value = !1, A.info("协作已关闭"));
|
|
6399
6442
|
}, St = () => {
|
|
6400
|
-
|
|
6443
|
+
L && (L.closeCollaboration(), I.value = !1, ae.value = !1, A.info("协作已关闭"));
|
|
6444
|
+
}, Ct = () => {
|
|
6445
|
+
let e = u.value;
|
|
6401
6446
|
if (!e) return;
|
|
6402
|
-
|
|
6447
|
+
bt(e), L.connect();
|
|
6403
6448
|
let t = {
|
|
6404
|
-
name: `协作人${Math.floor(Math.random() * 1e3)}`,
|
|
6405
|
-
color: `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`
|
|
6449
|
+
name: c.user?.name || `协作人${Math.floor(Math.random() * 1e3)}`,
|
|
6450
|
+
color: c.user?.color || `#${Math.floor(Math.random() * 16777215).toString(16).padStart(6, "0")}`
|
|
6406
6451
|
}, n = () => {
|
|
6407
|
-
if (
|
|
6408
|
-
if (
|
|
6409
|
-
|
|
6452
|
+
if (L.provider && L.provider.synced) {
|
|
6453
|
+
if (L.checkCollaborationClosed()) {
|
|
6454
|
+
L.disconnect(), I.value = !1, A.warning("该协作已关闭,无法加入");
|
|
6410
6455
|
return;
|
|
6411
6456
|
}
|
|
6412
|
-
|
|
6413
|
-
let e =
|
|
6414
|
-
e && (e.title && (
|
|
6457
|
+
L._setSyncReady(!0), L.setLocalUser(t);
|
|
6458
|
+
let e = L.pullFromYjs();
|
|
6459
|
+
e && (e.title && (F.title = e.title), e.meshes && (F.meshes = (e.meshes || []).map((e) => ({
|
|
6415
6460
|
notes: "",
|
|
6416
6461
|
parentId: null,
|
|
6417
6462
|
...e
|
|
6418
|
-
})))),
|
|
6419
|
-
ydoc:
|
|
6420
|
-
provider:
|
|
6421
|
-
onlineUsers:
|
|
6422
|
-
}),
|
|
6423
|
-
id:
|
|
6463
|
+
})))), I.value = !0, ae.value = !1, P.setCollabContext({
|
|
6464
|
+
ydoc: L.ydoc,
|
|
6465
|
+
provider: L.provider,
|
|
6466
|
+
onlineUsers: L.onlineUsers
|
|
6467
|
+
}), P.setCurrentUser({
|
|
6468
|
+
id: L.provider.awareness.clientID,
|
|
6424
6469
|
name: t.name,
|
|
6425
6470
|
color: t.color
|
|
6426
6471
|
}), A.success("已加入协作");
|
|
6427
6472
|
} else setTimeout(n, 100);
|
|
6428
6473
|
};
|
|
6429
6474
|
setTimeout(n, 200);
|
|
6430
|
-
},
|
|
6431
|
-
|
|
6432
|
-
},
|
|
6433
|
-
if (
|
|
6475
|
+
}, wt = () => {
|
|
6476
|
+
I.value ? St() : xt();
|
|
6477
|
+
}, Tt = async () => {
|
|
6478
|
+
if (I.value || await xt(), !j.value && (await pt(), !j.value)) {
|
|
6434
6479
|
A.warning("请先保存文档后再分享");
|
|
6435
6480
|
return;
|
|
6436
6481
|
}
|
|
6437
|
-
let e = `${window.location.origin}/explosion-3d/${
|
|
6482
|
+
let e = `${window.location.origin}/explosion-3d/${j.value}?collab=1`;
|
|
6438
6483
|
try {
|
|
6439
6484
|
await navigator.clipboard.writeText(e), A.success("协作链接已复制到剪贴板");
|
|
6440
6485
|
} catch {
|
|
@@ -6442,54 +6487,58 @@ animate();
|
|
|
6442
6487
|
}
|
|
6443
6488
|
};
|
|
6444
6489
|
return p(async () => {
|
|
6445
|
-
let e = localStorage.getItem("editor-user-name") || `用户${Math.floor(Math.random() * 1e3)}`;
|
|
6446
|
-
localStorage.setItem("editor-user-name", e),
|
|
6447
|
-
id: Date.now(),
|
|
6490
|
+
let e = c.user?.name || localStorage.getItem("editor-user-name") || `用户${Math.floor(Math.random() * 1e3)}`;
|
|
6491
|
+
localStorage.setItem("editor-user-name", e), P.setCurrentUser({
|
|
6492
|
+
id: c.user?.id || Date.now(),
|
|
6448
6493
|
name: e,
|
|
6449
|
-
color: "#409eff"
|
|
6450
|
-
}), await
|
|
6494
|
+
color: c.user?.color || "#409eff"
|
|
6495
|
+
}), await mt(), u.value && T.query.collab === "1" && Ct();
|
|
6451
6496
|
}), m(() => {
|
|
6452
|
-
|
|
6497
|
+
L &&= (L.destroy(), null);
|
|
6453
6498
|
}), (t, o) => {
|
|
6454
|
-
let
|
|
6499
|
+
let c = y("el-icon"), p = y("el-button"), m = y("Delete"), g = y("el-input"), _ = y("el-option"), C = y("el-select"), D = y("el-color-picker"), O = y("el-slider"), k = y("el-divider"), A = y("Monitor");
|
|
6455
6500
|
return h(), i("div", Ha, [
|
|
6456
|
-
s(
|
|
6457
|
-
title:
|
|
6458
|
-
"onUpdate:title": o[0] ||= (e) =>
|
|
6459
|
-
"is-connected":
|
|
6460
|
-
"online-users": S(
|
|
6461
|
-
"is-join-mode": S(
|
|
6462
|
-
|
|
6463
|
-
|
|
6464
|
-
|
|
6465
|
-
|
|
6466
|
-
|
|
6501
|
+
s(Pn, {
|
|
6502
|
+
title: F.title,
|
|
6503
|
+
"onUpdate:title": o[0] ||= (e) => F.title = e,
|
|
6504
|
+
"is-connected": I.value,
|
|
6505
|
+
"online-users": S(L) ? S(L).onlineUsers.value : [],
|
|
6506
|
+
"is-join-mode": S(T).query.collab === "1",
|
|
6507
|
+
"back-button": l.value.backButton,
|
|
6508
|
+
"title-editable": l.value.titleEditable,
|
|
6509
|
+
onBack: at,
|
|
6510
|
+
onAddPrimitive: Ze,
|
|
6511
|
+
onExplode: rt,
|
|
6512
|
+
onCollapse: it,
|
|
6513
|
+
onExplodeStyle: o[1] ||= (e) => ce.value = e,
|
|
6467
6514
|
onResetCamera: o[2] ||= (e) => t.$refs.viewport?.resetCamera(),
|
|
6468
|
-
onExport:
|
|
6469
|
-
onSave:
|
|
6470
|
-
onImportJson:
|
|
6471
|
-
onToggleCollab:
|
|
6472
|
-
onShareCollab:
|
|
6473
|
-
"show-history": !!u.value,
|
|
6474
|
-
onHistory:
|
|
6515
|
+
onExport: ht,
|
|
6516
|
+
onSave: pt,
|
|
6517
|
+
onImportJson: W,
|
|
6518
|
+
onToggleCollab: wt,
|
|
6519
|
+
onShareCollab: Tt,
|
|
6520
|
+
"show-history": !!(j.value || u.value),
|
|
6521
|
+
onHistory: lt
|
|
6475
6522
|
}, null, 8, [
|
|
6476
6523
|
"title",
|
|
6477
6524
|
"is-connected",
|
|
6478
6525
|
"online-users",
|
|
6479
6526
|
"is-join-mode",
|
|
6527
|
+
"back-button",
|
|
6528
|
+
"title-editable",
|
|
6480
6529
|
"show-history"
|
|
6481
6530
|
]),
|
|
6482
6531
|
a("input", {
|
|
6483
6532
|
ref_key: "fileInputRef",
|
|
6484
|
-
ref:
|
|
6533
|
+
ref: ee,
|
|
6485
6534
|
type: "file",
|
|
6486
6535
|
accept: ".obj,.gltf,.glb",
|
|
6487
6536
|
style: { display: "none" },
|
|
6488
|
-
onChange:
|
|
6537
|
+
onChange: yt
|
|
6489
6538
|
}, null, 544),
|
|
6490
6539
|
a("input", {
|
|
6491
6540
|
ref_key: "jsonInputRef",
|
|
6492
|
-
ref:
|
|
6541
|
+
ref: te,
|
|
6493
6542
|
type: "file",
|
|
6494
6543
|
accept: ".json",
|
|
6495
6544
|
style: { display: "none" },
|
|
@@ -6497,30 +6546,30 @@ animate();
|
|
|
6497
6546
|
}, null, 544),
|
|
6498
6547
|
a("div", Ua, [
|
|
6499
6548
|
s(fa, {
|
|
6500
|
-
models:
|
|
6501
|
-
onAddModel:
|
|
6549
|
+
models: Xe,
|
|
6550
|
+
onAddModel: U,
|
|
6502
6551
|
onAddUrl: Qe,
|
|
6503
|
-
onUploadFile: o[3] ||= (e) =>
|
|
6552
|
+
onUploadFile: o[3] ||= (e) => ee.value?.click()
|
|
6504
6553
|
}),
|
|
6505
6554
|
s(ea, {
|
|
6506
6555
|
ref_key: "viewport",
|
|
6507
|
-
ref:
|
|
6508
|
-
meshes:
|
|
6509
|
-
"selected-id":
|
|
6510
|
-
"explode-factor":
|
|
6556
|
+
ref: M,
|
|
6557
|
+
meshes: F.meshes,
|
|
6558
|
+
"selected-id": oe.value,
|
|
6559
|
+
"explode-factor": se.value,
|
|
6511
6560
|
onSelect: $e,
|
|
6512
|
-
onDoubleClick:
|
|
6513
|
-
onPositionChange:
|
|
6561
|
+
onDoubleClick: tt,
|
|
6562
|
+
onPositionChange: et
|
|
6514
6563
|
}, null, 8, [
|
|
6515
6564
|
"meshes",
|
|
6516
6565
|
"selected-id",
|
|
6517
6566
|
"explode-factor"
|
|
6518
6567
|
]),
|
|
6519
6568
|
a("div", Wa, [
|
|
6520
|
-
a("div", Ga, [o[17] ||= a("h4", null, "零件列表", -1), (h(!0), i(e, null, v(
|
|
6569
|
+
a("div", Ga, [o[17] ||= a("h4", null, "零件列表", -1), (h(!0), i(e, null, v(F.meshes, (e) => (h(), i("div", {
|
|
6521
6570
|
key: e.id,
|
|
6522
6571
|
class: d(["mesh-item", {
|
|
6523
|
-
selected:
|
|
6572
|
+
selected: oe.value === e.id,
|
|
6524
6573
|
"is-child": e.parentId
|
|
6525
6574
|
}]),
|
|
6526
6575
|
onClick: (t) => $e(e.id)
|
|
@@ -6530,15 +6579,15 @@ animate();
|
|
|
6530
6579
|
style: f({ background: e.color })
|
|
6531
6580
|
}, null, 4),
|
|
6532
6581
|
a("span", qa, x(e.label), 1),
|
|
6533
|
-
|
|
6582
|
+
Ie(e.id).length ? (h(), n(p, {
|
|
6534
6583
|
key: 0,
|
|
6535
6584
|
size: "small",
|
|
6536
6585
|
circle: "",
|
|
6537
6586
|
onClick: E((n) => t.$refs.viewport?.toggleExpand(e.id), ["stop"]),
|
|
6538
|
-
title:
|
|
6587
|
+
title: le.value.has(e.id) ? "收起" : "展开"
|
|
6539
6588
|
}, {
|
|
6540
|
-
default: w(() => [s(
|
|
6541
|
-
default: w(() => [(h(), n(b(
|
|
6589
|
+
default: w(() => [s(c, null, {
|
|
6590
|
+
default: w(() => [(h(), n(b(le.value.has(e.id) ? "FolderOpened" : "Folder")))]),
|
|
6542
6591
|
_: 2
|
|
6543
6592
|
}, 1024)]),
|
|
6544
6593
|
_: 2
|
|
@@ -6546,80 +6595,80 @@ animate();
|
|
|
6546
6595
|
s(p, {
|
|
6547
6596
|
size: "small",
|
|
6548
6597
|
circle: "",
|
|
6549
|
-
onClick: E((t) =>
|
|
6598
|
+
onClick: E((t) => nt(e.id), ["stop"])
|
|
6550
6599
|
}, {
|
|
6551
|
-
default: w(() => [s(
|
|
6600
|
+
default: w(() => [s(c, null, {
|
|
6552
6601
|
default: w(() => [s(m)]),
|
|
6553
6602
|
_: 1
|
|
6554
6603
|
})]),
|
|
6555
6604
|
_: 1
|
|
6556
6605
|
}, 8, ["onClick"])
|
|
6557
6606
|
], 10, Ka))), 128))]),
|
|
6558
|
-
|
|
6607
|
+
H.value ? (h(), i("div", Ja, [
|
|
6559
6608
|
o[26] ||= a("h4", null, "属性", -1),
|
|
6560
6609
|
a("div", Ya, [o[18] ||= a("label", null, "名称", -1), s(g, {
|
|
6561
|
-
modelValue:
|
|
6562
|
-
"onUpdate:modelValue": o[4] ||= (e) =>
|
|
6610
|
+
modelValue: H.value.label,
|
|
6611
|
+
"onUpdate:modelValue": o[4] ||= (e) => H.value.label = e,
|
|
6563
6612
|
size: "small"
|
|
6564
6613
|
}, null, 8, ["modelValue"])]),
|
|
6565
6614
|
a("div", Xa, [o[19] ||= a("label", null, "备注", -1), s(g, {
|
|
6566
|
-
modelValue:
|
|
6567
|
-
"onUpdate:modelValue": o[5] ||= (e) =>
|
|
6615
|
+
modelValue: H.value.notes,
|
|
6616
|
+
"onUpdate:modelValue": o[5] ||= (e) => H.value.notes = e,
|
|
6568
6617
|
type: "textarea",
|
|
6569
6618
|
rows: 2,
|
|
6570
6619
|
size: "small",
|
|
6571
6620
|
placeholder: "输入零件备注信息"
|
|
6572
6621
|
}, null, 8, ["modelValue"])]),
|
|
6573
6622
|
a("div", Za, [o[20] ||= a("label", null, "父零件", -1), s(C, {
|
|
6574
|
-
modelValue:
|
|
6575
|
-
"onUpdate:modelValue": o[6] ||= (e) =>
|
|
6623
|
+
modelValue: H.value.parentId,
|
|
6624
|
+
"onUpdate:modelValue": o[6] ||= (e) => H.value.parentId = e,
|
|
6576
6625
|
size: "small",
|
|
6577
6626
|
clearable: "",
|
|
6578
6627
|
placeholder: "无(顶级零件)",
|
|
6579
6628
|
style: { width: "100%" }
|
|
6580
6629
|
}, {
|
|
6581
|
-
default: w(() => [(h(!0), i(e, null, v(
|
|
6630
|
+
default: w(() => [(h(!0), i(e, null, v(Pe.value, (e) => (h(), n(_, {
|
|
6582
6631
|
key: e.id,
|
|
6583
6632
|
label: e.label,
|
|
6584
6633
|
value: e.id
|
|
6585
6634
|
}, null, 8, ["label", "value"]))), 128))]),
|
|
6586
6635
|
_: 1
|
|
6587
6636
|
}, 8, ["modelValue"])]),
|
|
6588
|
-
a("div", Qa, [o[21] ||= a("label", null, "颜色", -1), s(
|
|
6589
|
-
modelValue:
|
|
6590
|
-
"onUpdate:modelValue": o[7] ||= (e) =>
|
|
6637
|
+
a("div", Qa, [o[21] ||= a("label", null, "颜色", -1), s(D, {
|
|
6638
|
+
modelValue: H.value.color,
|
|
6639
|
+
"onUpdate:modelValue": o[7] ||= (e) => H.value.color = e,
|
|
6591
6640
|
size: "small"
|
|
6592
6641
|
}, null, 8, ["modelValue"])]),
|
|
6593
|
-
a("div", $a, [o[22] ||= a("label", null, "缩放", -1), s(
|
|
6594
|
-
modelValue:
|
|
6595
|
-
"onUpdate:modelValue": o[8] ||= (e) =>
|
|
6642
|
+
a("div", $a, [o[22] ||= a("label", null, "缩放", -1), s(O, {
|
|
6643
|
+
modelValue: H.value.scale,
|
|
6644
|
+
"onUpdate:modelValue": o[8] ||= (e) => H.value.scale = e,
|
|
6596
6645
|
min: .2,
|
|
6597
6646
|
max: 5,
|
|
6598
6647
|
step: .1,
|
|
6599
6648
|
"show-input": "",
|
|
6600
6649
|
"input-size": "small"
|
|
6601
6650
|
}, null, 8, ["modelValue"])]),
|
|
6602
|
-
a("div", eo, [o[23] ||= a("label", null, "X", -1), s(
|
|
6603
|
-
modelValue:
|
|
6604
|
-
"onUpdate:modelValue": o[9] ||= (e) =>
|
|
6651
|
+
a("div", eo, [o[23] ||= a("label", null, "X", -1), s(O, {
|
|
6652
|
+
modelValue: H.value.x,
|
|
6653
|
+
"onUpdate:modelValue": o[9] ||= (e) => H.value.x = e,
|
|
6605
6654
|
min: -10,
|
|
6606
6655
|
max: 10,
|
|
6607
6656
|
step: .1,
|
|
6608
6657
|
"show-input": "",
|
|
6609
6658
|
"input-size": "small"
|
|
6610
6659
|
}, null, 8, ["modelValue"])]),
|
|
6611
|
-
a("div", to, [o[24] ||= a("label", null, "Y", -1), s(
|
|
6612
|
-
modelValue:
|
|
6613
|
-
"onUpdate:modelValue": o[10] ||= (e) =>
|
|
6660
|
+
a("div", to, [o[24] ||= a("label", null, "Y", -1), s(O, {
|
|
6661
|
+
modelValue: H.value.y,
|
|
6662
|
+
"onUpdate:modelValue": o[10] ||= (e) => H.value.y = e,
|
|
6614
6663
|
min: -10,
|
|
6615
6664
|
max: 10,
|
|
6616
6665
|
step: .1,
|
|
6617
6666
|
"show-input": "",
|
|
6618
6667
|
"input-size": "small"
|
|
6619
6668
|
}, null, 8, ["modelValue"])]),
|
|
6620
|
-
a("div", no, [o[25] ||= a("label", null, "Z", -1), s(
|
|
6621
|
-
modelValue:
|
|
6622
|
-
"onUpdate:modelValue": o[11] ||= (e) =>
|
|
6669
|
+
a("div", no, [o[25] ||= a("label", null, "Z", -1), s(O, {
|
|
6670
|
+
modelValue: H.value.z,
|
|
6671
|
+
"onUpdate:modelValue": o[11] ||= (e) => H.value.z = e,
|
|
6623
6672
|
min: -10,
|
|
6624
6673
|
max: 10,
|
|
6625
6674
|
step: .1,
|
|
@@ -6627,36 +6676,36 @@ animate();
|
|
|
6627
6676
|
"input-size": "small"
|
|
6628
6677
|
}, null, 8, ["modelValue"])])
|
|
6629
6678
|
])) : r("", !0),
|
|
6630
|
-
a("div", ro, [o[28] ||= a("h4", null, "展开控制", -1), a("div", io, [o[27] ||= a("label", null, "展开程度", -1), s(
|
|
6631
|
-
modelValue:
|
|
6632
|
-
"onUpdate:modelValue": o[12] ||= (e) =>
|
|
6679
|
+
a("div", ro, [o[28] ||= a("h4", null, "展开控制", -1), a("div", io, [o[27] ||= a("label", null, "展开程度", -1), s(O, {
|
|
6680
|
+
modelValue: se.value,
|
|
6681
|
+
"onUpdate:modelValue": o[12] ||= (e) => se.value = e,
|
|
6633
6682
|
min: 0,
|
|
6634
6683
|
max: 5,
|
|
6635
6684
|
step: .1
|
|
6636
6685
|
}, null, 8, ["modelValue"])])]),
|
|
6637
|
-
s(
|
|
6686
|
+
s(k),
|
|
6638
6687
|
s(ja, {
|
|
6639
|
-
parts: S(
|
|
6640
|
-
"is-exploded": S(
|
|
6641
|
-
"explosion-factor": S(
|
|
6642
|
-
"is-generating": S(
|
|
6643
|
-
"generation-progress": S(
|
|
6688
|
+
parts: S(de),
|
|
6689
|
+
"is-exploded": S(fe),
|
|
6690
|
+
"explosion-factor": S(pe),
|
|
6691
|
+
"is-generating": S(Ce),
|
|
6692
|
+
"generation-progress": S(V),
|
|
6644
6693
|
"generation-status": S(we),
|
|
6645
|
-
"gen-error": S(
|
|
6646
|
-
providers: S(
|
|
6647
|
-
"current-provider": S(
|
|
6648
|
-
"api-key": S(
|
|
6649
|
-
onGenerate:
|
|
6650
|
-
onGenerateBoth:
|
|
6651
|
-
onExplosionChange:
|
|
6652
|
-
onStyleChange:
|
|
6653
|
-
onExplode:
|
|
6654
|
-
onAssemble:
|
|
6655
|
-
onHighlight:
|
|
6656
|
-
onClearHighlight:
|
|
6657
|
-
onFileSelected:
|
|
6658
|
-
onProviderChange: S(
|
|
6659
|
-
onApiKeyChange: S(
|
|
6694
|
+
"gen-error": S(Ee),
|
|
6695
|
+
providers: S(ke),
|
|
6696
|
+
"current-provider": S(De),
|
|
6697
|
+
"api-key": S(Oe),
|
|
6698
|
+
onGenerate: Be,
|
|
6699
|
+
onGenerateBoth: Ve,
|
|
6700
|
+
onExplosionChange: Ue,
|
|
6701
|
+
onStyleChange: We,
|
|
6702
|
+
onExplode: Ge,
|
|
6703
|
+
onAssemble: Ke,
|
|
6704
|
+
onHighlight: qe,
|
|
6705
|
+
onClearHighlight: Je,
|
|
6706
|
+
onFileSelected: ze,
|
|
6707
|
+
onProviderChange: S(Ae),
|
|
6708
|
+
onApiKeyChange: S(je)
|
|
6660
6709
|
}, null, 8, [
|
|
6661
6710
|
"parts",
|
|
6662
6711
|
"is-exploded",
|
|
@@ -6675,31 +6724,31 @@ animate();
|
|
|
6675
6724
|
]),
|
|
6676
6725
|
s(p, {
|
|
6677
6726
|
class: "ai-chat-fab",
|
|
6678
|
-
type:
|
|
6727
|
+
type: N.value ? "primary" : "default",
|
|
6679
6728
|
circle: "",
|
|
6680
6729
|
size: "large",
|
|
6681
|
-
onClick: o[13] ||= (e) =>
|
|
6730
|
+
onClick: o[13] ||= (e) => N.value = !N.value,
|
|
6682
6731
|
title: "AI助手"
|
|
6683
6732
|
}, {
|
|
6684
|
-
default: w(() => [s(
|
|
6685
|
-
default: w(() => [s(
|
|
6733
|
+
default: w(() => [s(c, null, {
|
|
6734
|
+
default: w(() => [s(A)]),
|
|
6686
6735
|
_: 1
|
|
6687
6736
|
})]),
|
|
6688
6737
|
_: 1
|
|
6689
6738
|
}, 8, ["type"]),
|
|
6690
|
-
s(
|
|
6691
|
-
visible:
|
|
6692
|
-
messages: S(
|
|
6693
|
-
loading: S(
|
|
6694
|
-
"is-collab": S(
|
|
6695
|
-
"collab-users": S(
|
|
6696
|
-
"current-user": S(
|
|
6697
|
-
"is-owner":
|
|
6698
|
-
onSend:
|
|
6699
|
-
onClose: o[14] ||= (e) =>
|
|
6700
|
-
"unread-mention": S(
|
|
6701
|
-
onClearUnread: o[15] ||= (e) => S(
|
|
6702
|
-
onClear:
|
|
6739
|
+
s(dn, {
|
|
6740
|
+
visible: N.value,
|
|
6741
|
+
messages: S(P).messages.value,
|
|
6742
|
+
loading: S(P).loading.value,
|
|
6743
|
+
"is-collab": S(P).isCollabMode.value,
|
|
6744
|
+
"collab-users": S(P).collabUsers.value,
|
|
6745
|
+
"current-user": S(P).currentUser.value,
|
|
6746
|
+
"is-owner": ae.value,
|
|
6747
|
+
onSend: st,
|
|
6748
|
+
onClose: o[14] ||= (e) => N.value = !1,
|
|
6749
|
+
"unread-mention": S(P).unreadMention.value,
|
|
6750
|
+
onClearUnread: o[15] ||= (e) => S(P).clearUnreadMention(),
|
|
6751
|
+
onClear: ct
|
|
6703
6752
|
}, null, 8, [
|
|
6704
6753
|
"visible",
|
|
6705
6754
|
"messages",
|
|
@@ -6710,16 +6759,16 @@ animate();
|
|
|
6710
6759
|
"is-owner",
|
|
6711
6760
|
"unread-mention"
|
|
6712
6761
|
]),
|
|
6713
|
-
s(
|
|
6714
|
-
modelValue:
|
|
6715
|
-
"onUpdate:modelValue": o[16] ||= (e) =>
|
|
6716
|
-
"document-id": u.value,
|
|
6717
|
-
onApply:
|
|
6762
|
+
s(Dn, {
|
|
6763
|
+
modelValue: ne.value,
|
|
6764
|
+
"onUpdate:modelValue": o[16] ||= (e) => ne.value = e,
|
|
6765
|
+
"document-id": j.value || u.value,
|
|
6766
|
+
onApply: ut
|
|
6718
6767
|
}, null, 8, ["modelValue", "document-id"])
|
|
6719
6768
|
]);
|
|
6720
6769
|
};
|
|
6721
6770
|
}
|
|
6722
|
-
}, [["__scopeId", "data-v-
|
|
6771
|
+
}, [["__scopeId", "data-v-7af2f68a"]]), so = c({
|
|
6723
6772
|
name: "YourCompanyExplosion3d",
|
|
6724
6773
|
props: {
|
|
6725
6774
|
docId: {
|
|
@@ -6730,6 +6779,14 @@ animate();
|
|
|
6730
6779
|
type: String,
|
|
6731
6780
|
default: "/api"
|
|
6732
6781
|
},
|
|
6782
|
+
saveApi: {
|
|
6783
|
+
type: [String, Function],
|
|
6784
|
+
default: null
|
|
6785
|
+
},
|
|
6786
|
+
loadApi: {
|
|
6787
|
+
type: [String, Function],
|
|
6788
|
+
default: null
|
|
6789
|
+
},
|
|
6733
6790
|
wsUrl: {
|
|
6734
6791
|
type: String,
|
|
6735
6792
|
default: ""
|
|
@@ -6742,6 +6799,10 @@ animate();
|
|
|
6742
6799
|
color: ""
|
|
6743
6800
|
})
|
|
6744
6801
|
},
|
|
6802
|
+
uiConfig: {
|
|
6803
|
+
type: Object,
|
|
6804
|
+
default: () => ({})
|
|
6805
|
+
},
|
|
6745
6806
|
roomId: {
|
|
6746
6807
|
type: String,
|
|
6747
6808
|
default: ""
|