ss-component-new 1.1.284 → 1.1.285
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/{array-CYXVrhQ2.cjs → array-CDILeToM.cjs} +1 -1
- package/dist/{array-CXpM8VLE.js → array-CE7B6klf.js} +2 -2
- package/dist/{cloneDeep-DulWrX2z.cjs → cloneDeep-BNFnn0zX.cjs} +1 -1
- package/dist/{cloneDeep-Cu4J5N0F.js → cloneDeep-DWHy6IpY.js} +1 -1
- package/dist/{index-BBgdD9SQ.js → index--bXotXNv.js} +7 -7
- package/dist/{index-BRGNMZ86.cjs → index--tDOJA22.cjs} +1 -1
- package/dist/{index-BNl_32Pt.cjs → index--yrhtvQe.cjs} +1 -1
- package/dist/{index-aA-E4fpW.cjs → index-46Vs1c7C.cjs} +5 -5
- package/dist/{index-Dn84Ec2c.js → index-B-CelrJJ.js} +7 -7
- package/dist/{index-DPz_98e5.cjs → index-BAmnP3Ub.cjs} +1 -1
- package/dist/{index-CUYS_7_G.cjs → index-BBcNqnyI.cjs} +1 -1
- package/dist/{index-C8ufltkd.js → index-BFSa040W.js} +3 -3
- package/dist/{index-BJNvTKJa.js → index-BIQvaUwR.js} +5 -5
- package/dist/{index-XFMwwtaT.cjs → index-BMsVtDeF.cjs} +1 -1
- package/dist/{index-B40N_RE8.js → index-BYH1Sfpu.js} +343 -342
- package/dist/{index-BnIAoUM7.cjs → index-Bbmj90ur.cjs} +1 -1
- package/dist/{index-D5bqw366.js → index-Bc4jLTjd.js} +1 -1
- package/dist/{index-DLeWsgTA.cjs → index-BdnfVBgu.cjs} +1 -1
- package/dist/{index-BUV-XDv5.js → index-Bdv3Vqgu.js} +5 -5
- package/dist/{index-DLw2PLSD.cjs → index-Bh8voPjY.cjs} +1 -1
- package/dist/{index-BuceFihY.js → index-BikN7FDA.js} +6 -6
- package/dist/{index-Cd88IGF7.js → index-BlQghV-Q.js} +8 -8
- package/dist/{index-wxhd6XdQ.js → index-BsKowvr-.js} +9 -9
- package/dist/{index-C7SCYeaB.cjs → index-ByrSrIUU.cjs} +1 -1
- package/dist/{index-Dwe8wTVx.cjs → index-Bzoki8-m.cjs} +1 -1
- package/dist/{index-dl7sUt6b.cjs → index-C-7-cq2g.cjs} +1 -1
- package/dist/{index-B7cysJ4B.cjs → index-CMJXlYzo.cjs} +1 -1
- package/dist/{index-YEm-6sfT.js → index-CTxRaivF.js} +4 -4
- package/dist/{index-_a5bo92d.cjs → index-CTzXOLjB.cjs} +1 -1
- package/dist/{index-B-G6AYGU.js → index-C_Tb2wMg.js} +1 -1
- package/dist/{index-0CvWYYy4.js → index-C_ehVg5I.js} +4 -4
- package/dist/{index-CvEGh5vC.js → index-CbXh9imr.js} +4 -4
- package/dist/{index-lTY8kkcS.js → index-CoPhXdsx.js} +3 -3
- package/dist/{index-DerKVJ8K.cjs → index-CwNWoaii.cjs} +1 -1
- package/dist/{index-DLkcsreR.js → index-Cy4FDmtX.js} +8 -8
- package/dist/{index-B9GZsKv8.cjs → index-CzJaJW0L.cjs} +1 -1
- package/dist/{index-DknRkncm.js → index-D-wl1EhA.js} +5 -5
- package/dist/{index-_T0mcTGp.js → index-DJ9FZXIy.js} +3 -3
- package/dist/{index-BIlUPWxQ.cjs → index-DQMdpQjD.cjs} +1 -1
- package/dist/{index-Ch6ikSG5.cjs → index-DR_3S8Rq.cjs} +1 -1
- package/dist/{index-Trhg47DP.cjs → index-DRab4U7_.cjs} +1 -1
- package/dist/{index-arqkqMyt.js → index-DTK0eWDO.js} +3 -3
- package/dist/{index-DnjK3D-s.js → index-DU_xN9m3.js} +4 -4
- package/dist/{index-7sXrS1yV.js → index-DXwnJGsJ.js} +4 -4
- package/dist/{index-GeCpVfka.js → index-Da3v8RW5.js} +1 -1
- package/dist/{index-DVViKWsC.js → index-DjmRe7eY.js} +1 -1
- package/dist/{index-C1A-zCVm.cjs → index-Dp9_1PUk.cjs} +1 -1
- package/dist/{index-BTEbjfBy.cjs → index-DrXbNZIl.cjs} +1 -1
- package/dist/{index-D0sHlQ2L.cjs → index-DsO_P7d9.cjs} +1 -1
- package/dist/{index-CitjQ8BE.cjs → index-IwuwVJBt.cjs} +1 -1
- package/dist/{index-auVQAWKg.cjs → index-ba8rsHY7.cjs} +1 -1
- package/dist/{index-9Ch923O9.cjs → index-bsJL_aVc.cjs} +1 -1
- package/dist/{index-__2G_x90.js → index-cAQcbJ9O.js} +5 -5
- package/dist/{index-jyE54Nke.cjs → index-d8zwpF8A.cjs} +1 -1
- package/dist/{index-VFPFY5-Z.js → index-ly0Kakz9.js} +3 -3
- package/dist/{index-B5qq-x7u.js → index-vpNj6sEQ.js} +6 -6
- package/dist/{index.vue_vue_type_script_setup_true_lang-2hVlD-xw.js → index.vue_vue_type_script_setup_true_lang-BrHLi-f2.js} +1 -1
- package/dist/{index.vue_vue_type_script_setup_true_lang-BXFLrQHw.cjs → index.vue_vue_type_script_setup_true_lang-Cng_rm00.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-CNdG-bkl.js → index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-CH8zWbm3.js} +13 -13
- package/dist/{index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-fkN1tNN3.cjs → index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-PXzachP5.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-D51c0Mj0.js → index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-D2j-vD7D.js} +8 -8
- package/dist/{index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-U3bECJf9.cjs → index.vue_vue_type_style_index_0_scoped_d9b749a8_lang-mAS6WR0L.cjs} +1 -1
- package/dist/{login-CnEIhZuS.js → login-Cp8KILwt.js} +2 -2
- package/dist/{login-DBXmJeJa.cjs → login-H7fUqtPQ.cjs} +1 -1
- package/dist/{main-mO0yG0t0.cjs → main-DcikHRiU.cjs} +1 -1
- package/dist/{main-oGBZDTyg.js → main-kkKzateL.js} +7 -7
- package/dist/{menu-tAoAC3NP.js → menu-Bv24qT_6.js} +1 -1
- package/dist/{menu-MBS9ZmYw.cjs → menu-C3MdhaHb.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +7 -7
- package/dist/ss-component3.cjs +1 -1
- package/dist/ss-component3.js +1 -1
- package/package.json +1 -1
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { ref as me, onMounted as gn, nextTick as Qt, onBeforeUnmount as go, createElementBlock as ye, openBlock as le, createElementVNode as Y, createCommentVNode as Be, normalizeClass as en, unref as U, withDirectives as Bt, isRef as tn, vModelRadio as nn, toDisplayString as qe, watch as it, Fragment as un, renderList as hn, normalizeStyle as bo, resolveComponent as Pe, resolveDirective as Ts, createBlock as Ie, withCtx as fe, createVNode as oe, createTextVNode as yt, renderSlot as Yt, resolveDynamicComponent as Pn, defineComponent as yo } from "vue";
|
|
2
|
-
import { m as Bn, a as zn, b as Vn } from "./index-
|
|
3
|
-
import Ln from "./index-
|
|
4
|
-
import { p as tt } from "./index-
|
|
5
|
-
import { C as wo, V as ce, M as Vt, T as zt, Q as pn, S as ls, a as Ge, R as _o, P as an, b as Ut, c as Es, d as wt, e as Sn, W as vo, f as ko, A as xo, g as Oe, X as Co, h as Ns, D as rn, H as Ao, i as Rn, B as Hn, j as xn, k as $e, l as Tt, m as Ze, E as ln, L as Kt, F as bn, G as fn, n as Gt, o as Ue, p as Ht, q as cs, r as $t, s as Dn, t as cn, v as Gn, w as Ms, x as qt, y as Et, z as Ps, I as $n, J as Cn, K as To, N as Eo, O as ut, U as ds, Y as us, Z as No, _ as Mo, $ as Po, a0 as hs, a1 as Lo, a2 as So, a3 as Ro, a4 as Ls, a5 as Do, a6 as ps, a7 as Fo, a8 as fs, a9 as jo, aa as Oo, ab as Io, ac as Uo, ad as Bo, ae as zo, af as Vo, u as yn, ag as Ho, ah as qn, ai as Go, aj as $o, ak as Ss } from "./index-
|
|
6
|
-
import { s as et, u as wn, b as ot, g as qo } from "./menu-
|
|
7
|
-
import { u as Yo } from "./index-
|
|
8
|
-
import { o as Rs, c as Ds, a as Fs, b as mn, s as We, g as Fn, d as jn, e as On, f as In, _ as Ko, h as Wo, i as Zo } from "./index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-
|
|
2
|
+
import { m as Bn, a as zn, b as Vn } from "./index-Cy4FDmtX.js";
|
|
3
|
+
import Ln from "./index-Bc4jLTjd.js";
|
|
4
|
+
import { p as tt } from "./index-DjmRe7eY.js";
|
|
5
|
+
import { C as wo, V as ce, M as Vt, T as zt, Q as pn, S as ls, a as Ge, R as _o, P as an, b as Ut, c as Es, d as wt, e as Sn, W as vo, f as ko, A as xo, g as Oe, X as Co, h as Ns, D as rn, H as Ao, i as Rn, B as Hn, j as xn, k as $e, l as Tt, m as Ze, E as ln, L as Kt, F as bn, G as fn, n as Gt, o as Ue, p as Ht, q as cs, r as $t, s as Dn, t as cn, v as Gn, w as Ms, x as qt, y as Et, z as Ps, I as $n, J as Cn, K as To, N as Eo, O as ut, U as ds, Y as us, Z as No, _ as Mo, $ as Po, a0 as hs, a1 as Lo, a2 as So, a3 as Ro, a4 as Ls, a5 as Do, a6 as ps, a7 as Fo, a8 as fs, a9 as jo, aa as Oo, ab as Io, ac as Uo, ad as Bo, ae as zo, af as Vo, u as yn, ag as Ho, ah as qn, ai as Go, aj as $o, ak as Ss } from "./index-cAQcbJ9O.js";
|
|
6
|
+
import { s as et, u as wn, b as ot, g as qo } from "./menu-Bv24qT_6.js";
|
|
7
|
+
import { u as Yo } from "./index-B-CelrJJ.js";
|
|
8
|
+
import { o as Rs, c as Ds, a as Fs, b as mn, s as We, g as Fn, d as jn, e as On, f as In, _ as Ko, h as Wo, i as Zo } from "./index.vue_vue_type_style_index_0_scoped_4bf164f6_lang-CH8zWbm3.js";
|
|
9
9
|
import { _ as Mt } from "./_plugin-vue_export-helper-CHgC5LLL.js";
|
|
10
|
-
import { i as Xo, e as Jo, b as ms, c as gs, a as Qo } from "./array-
|
|
11
|
-
import { u as js } from "./login-
|
|
10
|
+
import { i as Xo, e as Jo, b as ms, c as gs, a as Qo } from "./array-CE7B6klf.js";
|
|
11
|
+
import { u as js } from "./login-Cp8KILwt.js";
|
|
12
12
|
import { S as bt } from "./index-BHtNKL1L.js";
|
|
13
|
-
import { E as ei, s as ti } from "./index-
|
|
14
|
-
import { c as Nt } from "./cloneDeep-
|
|
15
|
-
import { d as Un } from "./index-
|
|
16
|
-
import { _ as ni } from "./index-
|
|
13
|
+
import { E as ei, s as ti } from "./index-BsKowvr-.js";
|
|
14
|
+
import { c as Nt } from "./cloneDeep-DWHy6IpY.js";
|
|
15
|
+
import { d as Un } from "./index-DJ9FZXIy.js";
|
|
16
|
+
import { _ as ni } from "./index-DXwnJGsJ.js";
|
|
17
17
|
const bs = { type: "change" }, Yn = { type: "start" }, Os = { type: "end" }, sn = new _o(), ys = new an(), si = Math.cos(70 * Ut.DEG2RAD), Se = new ce(), He = 2 * Math.PI, xe = {
|
|
18
18
|
NONE: -1,
|
|
19
19
|
ROTATE: 0,
|
|
@@ -492,8 +492,8 @@ function bi(E) {
|
|
|
492
492
|
}, D = () => {
|
|
493
493
|
const C = new Ns(4210752, 0.6);
|
|
494
494
|
n.add(C);
|
|
495
|
-
const
|
|
496
|
-
|
|
495
|
+
const _ = new rn(16777215, 2);
|
|
496
|
+
_.position.set(10, 10, 8), _.castShadow = !0, _.shadow.mapSize.width = 2048, _.shadow.mapSize.height = 2048, _.shadow.camera.near = 0.5, _.shadow.camera.far = 50, n.add(_);
|
|
497
497
|
const f = new rn(16777215, 0.8);
|
|
498
498
|
f.position.set(-8, -8, 6), n.add(f);
|
|
499
499
|
const j = new rn(16777215, 0.6);
|
|
@@ -523,10 +523,10 @@ function bi(E) {
|
|
|
523
523
|
C[f] && C[f].dispose && C[f].dispose();
|
|
524
524
|
}), C.dispose && C.dispose();
|
|
525
525
|
}, R = (C) => {
|
|
526
|
-
C.traverse((
|
|
527
|
-
|
|
526
|
+
C.traverse((_) => {
|
|
527
|
+
_.geometry && _.geometry.dispose(), _.material && (Array.isArray(_.material) ? _.material.forEach((f) => {
|
|
528
528
|
A(f);
|
|
529
|
-
}) : A(
|
|
529
|
+
}) : A(_.material));
|
|
530
530
|
});
|
|
531
531
|
};
|
|
532
532
|
return {
|
|
@@ -538,8 +538,8 @@ function bi(E) {
|
|
|
538
538
|
initThreeJS: L,
|
|
539
539
|
handleResize: () => {
|
|
540
540
|
if (!E.value || !a || !r || !l) return;
|
|
541
|
-
const C = E.value,
|
|
542
|
-
a.aspect =
|
|
541
|
+
const C = E.value, _ = C.clientWidth, f = C.clientHeight;
|
|
542
|
+
a.aspect = _ / f, a.updateProjectionMatrix(), r.setSize(_, f), l.update();
|
|
543
543
|
},
|
|
544
544
|
fitCameraToAllModels: () => {
|
|
545
545
|
if (!a || !c || u.value.length === 0) return;
|
|
@@ -547,7 +547,7 @@ function bi(E) {
|
|
|
547
547
|
u.value.forEach((F) => {
|
|
548
548
|
C.expandByObject(F);
|
|
549
549
|
});
|
|
550
|
-
const
|
|
550
|
+
const _ = C.getSize(new ce()), f = C.getCenter(new ce()), T = Math.max(_.x, _.y, _.z) * 0.8, k = new ce(f.x + T, f.y + T, f.z + T), H = f.clone();
|
|
551
551
|
a.position.copy(k), a.lookAt(H), c.target.copy(H), c.update(), b.value.copy(k), g.value.copy(H);
|
|
552
552
|
},
|
|
553
553
|
getThreeJSObjects: () => ({
|
|
@@ -559,14 +559,14 @@ function bi(E) {
|
|
|
559
559
|
}),
|
|
560
560
|
clearAllModels: () => {
|
|
561
561
|
if (!n) return;
|
|
562
|
-
u.value.forEach((
|
|
563
|
-
n.remove(
|
|
562
|
+
u.value.forEach((_) => {
|
|
563
|
+
n.remove(_), R(_);
|
|
564
564
|
});
|
|
565
565
|
const C = [];
|
|
566
|
-
n.children.forEach((
|
|
567
|
-
!
|
|
568
|
-
}), C.forEach((
|
|
569
|
-
n.remove(
|
|
566
|
+
n.children.forEach((_) => {
|
|
567
|
+
!_.isLight && !_.isCamera && C.push(_);
|
|
568
|
+
}), C.forEach((_) => {
|
|
569
|
+
n.remove(_), R(_);
|
|
570
570
|
}), u.value = [];
|
|
571
571
|
},
|
|
572
572
|
cleanup: () => {
|
|
@@ -578,7 +578,7 @@ function yi(E, n) {
|
|
|
578
578
|
const a = me(!1);
|
|
579
579
|
let r = null, c = 12700, l = new ce(), y = new ce(), u = new ce(), b = 0, g = null;
|
|
580
580
|
const L = (p) => p < 0.5 ? 4 * p * p * p : 1 - Math.pow(-2 * p + 2, 3) / 2, D = (p) => {
|
|
581
|
-
const N = new ce(), x = b * 1.2, O = new ce(u.x + x, u.y, u.z), C = new ce(u.x, u.y + x, u.z),
|
|
581
|
+
const N = new ce(), x = b * 1.2, O = new ce(u.x + x, u.y, u.z), C = new ce(u.x, u.y + x, u.z), _ = new ce(u.x, u.y - x, u.z);
|
|
582
582
|
if (p <= 0.567) {
|
|
583
583
|
const j = p / 0.567 * Math.PI * 2;
|
|
584
584
|
N.x = u.x + Math.cos(j) * x, N.z = u.z + Math.sin(j) * x, N.y = u.y;
|
|
@@ -590,7 +590,7 @@ function yi(E, n) {
|
|
|
590
590
|
N.x = u.x + Math.sin(T) * x, N.y = u.y + Math.cos(T) * x, N.z = u.z;
|
|
591
591
|
} else {
|
|
592
592
|
const f = (p - 0.881) / 0.119, j = L(f);
|
|
593
|
-
N.lerpVectors(
|
|
593
|
+
N.lerpVectors(_, l, j);
|
|
594
594
|
}
|
|
595
595
|
return N;
|
|
596
596
|
}, S = () => {
|
|
@@ -617,9 +617,9 @@ function yi(E, n) {
|
|
|
617
617
|
u = x.getCenter(new ce()), b = Math.max(O.x, O.y, O.z) * 1.2;
|
|
618
618
|
const C = new ce(u.x + b * 1.2, u.y, u.z);
|
|
619
619
|
N.enabled = !1;
|
|
620
|
-
const
|
|
620
|
+
const _ = p.position.clone(), f = 1e3, j = Date.now(), T = () => {
|
|
621
621
|
const k = Date.now() - j, H = Math.min(k / f, 1), F = L(H);
|
|
622
|
-
p.position.lerpVectors(
|
|
622
|
+
p.position.lerpVectors(_, C, F), p.lookAt(u), N.target.copy(u), H < 1 ? requestAnimationFrame(T) : (a.value = !0, r = null, S());
|
|
623
623
|
};
|
|
624
624
|
T();
|
|
625
625
|
}, R = () => {
|
|
@@ -635,8 +635,8 @@ function yi(E, n) {
|
|
|
635
635
|
const { camera: p, controls: N } = E();
|
|
636
636
|
if (!p || !N) return;
|
|
637
637
|
N.enabled = !0;
|
|
638
|
-
const x = p.position.clone(), O = N.target.clone(), C = 1500,
|
|
639
|
-
const j = Date.now() -
|
|
638
|
+
const x = p.position.clone(), O = N.target.clone(), C = 1500, _ = Date.now(), f = () => {
|
|
639
|
+
const j = Date.now() - _, T = Math.min(j / C, 1), k = L(T);
|
|
640
640
|
p.position.lerpVectors(x, l, k), N.target.lerpVectors(O, y, k), T < 1 && requestAnimationFrame(f);
|
|
641
641
|
};
|
|
642
642
|
f();
|
|
@@ -660,32 +660,32 @@ function wi(E, n) {
|
|
|
660
660
|
// Z轴平面
|
|
661
661
|
];
|
|
662
662
|
}, g = () => {
|
|
663
|
-
y.makeEmpty(), n.value.forEach((
|
|
664
|
-
y.expandByObject(
|
|
663
|
+
y.makeEmpty(), n.value.forEach((w) => {
|
|
664
|
+
y.expandByObject(w);
|
|
665
665
|
}), u = y.getCenter(new ce());
|
|
666
|
-
}, L = (
|
|
666
|
+
}, L = (w) => {
|
|
667
667
|
const p = y.getSize(new ce());
|
|
668
668
|
let N, x, O;
|
|
669
|
-
|
|
669
|
+
w === "x" ? (N = new xn(p.z * 1.2, p.y * 1.2), x = new ce(u.x, u.y, u.z), O = new ln(0, Math.PI / 2, 0)) : w === "y" ? (N = new xn(p.x * 1.2, p.z * 1.2), x = new ce(u.x, u.y, u.z), O = new ln(Math.PI / 2, 0, 0)) : w === "z" && (N = new xn(p.x * 1.2, p.y * 1.2), x = new ce(u.x, u.y, u.z), O = new ln(0, 0, 0));
|
|
670
670
|
const C = new $e({
|
|
671
671
|
color: 8900331,
|
|
672
672
|
transparent: !0,
|
|
673
673
|
opacity: 0.3,
|
|
674
674
|
side: Tt,
|
|
675
675
|
depthWrite: !1
|
|
676
|
-
}),
|
|
677
|
-
return
|
|
676
|
+
}), _ = new Ze(N, C);
|
|
677
|
+
return _.position.copy(x), _.rotation.copy(O), _;
|
|
678
678
|
}, D = () => {
|
|
679
679
|
if (S(), A(), r.value === "none")
|
|
680
680
|
return;
|
|
681
681
|
g();
|
|
682
|
-
let
|
|
683
|
-
if (r.value === "x" ? (c[0].constant = -u.x,
|
|
682
|
+
let w = null;
|
|
683
|
+
if (r.value === "x" ? (c[0].constant = -u.x, w = c[0]) : r.value === "y" ? (c[1].constant = -u.y, w = c[1]) : r.value === "z" && (c[2].constant = -u.z, w = c[2]), w) {
|
|
684
684
|
n.value.forEach((N) => {
|
|
685
685
|
N.traverse((x) => {
|
|
686
686
|
x.isMesh && x.material && (Array.isArray(x.material) ? x.material.forEach((O) => {
|
|
687
|
-
O.clippingPlanes = [
|
|
688
|
-
}) : x.material.clippingPlanes = [
|
|
687
|
+
O.clippingPlanes = [w];
|
|
688
|
+
}) : x.material.clippingPlanes = [w]);
|
|
689
689
|
});
|
|
690
690
|
});
|
|
691
691
|
const { scene: p } = E();
|
|
@@ -695,17 +695,17 @@ function wi(E, n) {
|
|
|
695
695
|
}
|
|
696
696
|
}
|
|
697
697
|
}, S = () => {
|
|
698
|
-
n.value.forEach((
|
|
699
|
-
|
|
698
|
+
n.value.forEach((w) => {
|
|
699
|
+
w.traverse((p) => {
|
|
700
700
|
p.isMesh && p.material && (Array.isArray(p.material) ? p.material.forEach((N) => {
|
|
701
701
|
N.clippingPlanes = [];
|
|
702
702
|
}) : p.material.clippingPlanes = []);
|
|
703
703
|
});
|
|
704
704
|
});
|
|
705
705
|
}, A = () => {
|
|
706
|
-
const { scene:
|
|
707
|
-
|
|
708
|
-
|
|
706
|
+
const { scene: w } = E();
|
|
707
|
+
w && l.forEach((p) => {
|
|
708
|
+
w.remove(p), p.geometry.dispose(), p.material.dispose();
|
|
709
709
|
}), l = [];
|
|
710
710
|
};
|
|
711
711
|
return {
|
|
@@ -968,16 +968,16 @@ class En extends Kt {
|
|
|
968
968
|
}
|
|
969
969
|
} else if (L === "f") {
|
|
970
970
|
const S = g.slice(1).trim().split(ws), A = [];
|
|
971
|
-
for (let
|
|
972
|
-
const N = S[
|
|
971
|
+
for (let w = 0, p = S.length; w < p; w++) {
|
|
972
|
+
const N = S[w];
|
|
973
973
|
if (N.length > 0) {
|
|
974
974
|
const x = N.split("/");
|
|
975
975
|
A.push(x);
|
|
976
976
|
}
|
|
977
977
|
}
|
|
978
978
|
const R = A[0];
|
|
979
|
-
for (let
|
|
980
|
-
const N = A[
|
|
979
|
+
for (let w = 1, p = A.length - 1; w < p; w++) {
|
|
980
|
+
const N = A[w], x = A[w + 1];
|
|
981
981
|
a.addFace(
|
|
982
982
|
R[0],
|
|
983
983
|
N[0],
|
|
@@ -997,7 +997,7 @@ class En extends Kt {
|
|
|
997
997
|
if (g.indexOf("/") === -1)
|
|
998
998
|
S = D;
|
|
999
999
|
else
|
|
1000
|
-
for (let R = 0,
|
|
1000
|
+
for (let R = 0, w = D.length; R < w; R++) {
|
|
1001
1001
|
const p = D[R].split("/");
|
|
1002
1002
|
p[0] !== "" && S.push(p[0]), p[1] !== "" && A.push(p[1]);
|
|
1003
1003
|
}
|
|
@@ -1034,12 +1034,12 @@ class En extends Kt {
|
|
|
1034
1034
|
const g = a.objects[u], L = g.geometry, D = g.materials, S = L.type === "Line", A = L.type === "Points";
|
|
1035
1035
|
let R = !1;
|
|
1036
1036
|
if (L.vertices.length === 0) continue;
|
|
1037
|
-
const
|
|
1038
|
-
|
|
1037
|
+
const w = new Gt();
|
|
1038
|
+
w.setAttribute("position", new Ue(L.vertices, 3)), L.normals.length > 0 && w.setAttribute("normal", new Ue(L.normals, 3)), L.colors.length > 0 && (R = !0, w.setAttribute("color", new Ue(L.colors, 3))), L.hasUVIndices === !0 && w.setAttribute("uv", new Ue(L.uvs, 2));
|
|
1039
1039
|
const p = [];
|
|
1040
1040
|
for (let x = 0, O = D.length; x < O; x++) {
|
|
1041
|
-
const C = D[x],
|
|
1042
|
-
let f = a.materials[
|
|
1041
|
+
const C = D[x], _ = C.name + "_" + C.smooth + "_" + R;
|
|
1042
|
+
let f = a.materials[_];
|
|
1043
1043
|
if (this.materials !== null) {
|
|
1044
1044
|
if (f = this.materials.create(C.name), S && f && !(f instanceof Ht)) {
|
|
1045
1045
|
const j = new Ht();
|
|
@@ -1049,17 +1049,17 @@ class En extends Kt {
|
|
|
1049
1049
|
cs.prototype.copy.call(j, f), j.color.copy(f.color), j.map = f.map, f = j;
|
|
1050
1050
|
}
|
|
1051
1051
|
}
|
|
1052
|
-
f === void 0 && (S ? f = new Ht() : A ? f = new $t({ size: 1, sizeAttenuation: !1 }) : f = new $e(), f.name = C.name, f.flatShading = !C.smooth, f.vertexColors = R, a.materials[
|
|
1052
|
+
f === void 0 && (S ? f = new Ht() : A ? f = new $t({ size: 1, sizeAttenuation: !1 }) : f = new $e(), f.name = C.name, f.flatShading = !C.smooth, f.vertexColors = R, a.materials[_] = f), p.push(f);
|
|
1053
1053
|
}
|
|
1054
1054
|
let N;
|
|
1055
1055
|
if (p.length > 1) {
|
|
1056
1056
|
for (let x = 0, O = D.length; x < O; x++) {
|
|
1057
1057
|
const C = D[x];
|
|
1058
|
-
|
|
1058
|
+
w.addGroup(C.groupStart, C.groupCount, x);
|
|
1059
1059
|
}
|
|
1060
|
-
S ? N = new Dn(
|
|
1060
|
+
S ? N = new Dn(w, p) : A ? N = new cn(w, p) : N = new Ze(w, p);
|
|
1061
1061
|
} else
|
|
1062
|
-
S ? N = new Dn(
|
|
1062
|
+
S ? N = new Dn(w, p[0]) : A ? N = new cn(w, p[0]) : N = new Ze(w, p[0]);
|
|
1063
1063
|
N.name = g.name, l.add(N);
|
|
1064
1064
|
}
|
|
1065
1065
|
else if (a.vertices.length > 0) {
|
|
@@ -1304,8 +1304,8 @@ class dn extends Kt {
|
|
|
1304
1304
|
if (80 + 32 / 8 + S * D === L.byteLength)
|
|
1305
1305
|
return !0;
|
|
1306
1306
|
const R = [115, 111, 108, 105, 100];
|
|
1307
|
-
for (let
|
|
1308
|
-
if (r(R, L,
|
|
1307
|
+
for (let w = 0; w < 5; w++)
|
|
1308
|
+
if (r(R, L, w)) return !1;
|
|
1309
1309
|
return !0;
|
|
1310
1310
|
}
|
|
1311
1311
|
function r(g, L, D) {
|
|
@@ -1315,27 +1315,27 @@ class dn extends Kt {
|
|
|
1315
1315
|
}
|
|
1316
1316
|
function c(g) {
|
|
1317
1317
|
const L = new DataView(g), D = L.getUint32(80, !0);
|
|
1318
|
-
let S, A, R,
|
|
1318
|
+
let S, A, R, w = !1, p, N, x, O, C;
|
|
1319
1319
|
for (let F = 0; F < 70; F++)
|
|
1320
|
-
L.getUint32(F, !1) == 1129270351 && L.getUint8(F + 4) == 82 && L.getUint8(F + 5) == 61 && (
|
|
1321
|
-
const
|
|
1320
|
+
L.getUint32(F, !1) == 1129270351 && L.getUint8(F + 4) == 82 && L.getUint8(F + 5) == 61 && (w = !0, p = new Float32Array(D * 3 * 3), N = L.getUint8(F + 6) / 255, x = L.getUint8(F + 7) / 255, O = L.getUint8(F + 8) / 255, C = L.getUint8(F + 9) / 255);
|
|
1321
|
+
const _ = 84, f = 12 * 4 + 2, j = new Gt(), T = new Float32Array(D * 3 * 3), k = new Float32Array(D * 3 * 3), H = new wt();
|
|
1322
1322
|
for (let F = 0; F < D; F++) {
|
|
1323
|
-
const B =
|
|
1324
|
-
if (
|
|
1323
|
+
const B = _ + F * f, ie = L.getFloat32(B, !0), he = L.getFloat32(B + 4, !0), m = L.getFloat32(B + 8, !0);
|
|
1324
|
+
if (w) {
|
|
1325
1325
|
const d = L.getUint16(B + 48, !0);
|
|
1326
1326
|
(d & 32768) === 0 ? (S = (d & 31) / 31, A = (d >> 5 & 31) / 31, R = (d >> 10 & 31) / 31) : (S = N, A = x, R = O);
|
|
1327
1327
|
}
|
|
1328
1328
|
for (let d = 1; d <= 3; d++) {
|
|
1329
1329
|
const I = B + d * 12, $ = F * 3 * 3 + (d - 1) * 3;
|
|
1330
|
-
T[$] = L.getFloat32(I, !0), T[$ + 1] = L.getFloat32(I + 4, !0), T[$ + 2] = L.getFloat32(I + 8, !0), k[$] = ie, k[$ + 1] = he, k[$ + 2] = m,
|
|
1330
|
+
T[$] = L.getFloat32(I, !0), T[$ + 1] = L.getFloat32(I + 4, !0), T[$ + 2] = L.getFloat32(I + 8, !0), k[$] = ie, k[$ + 1] = he, k[$ + 2] = m, w && (H.setRGB(S, A, R, Oe), p[$] = H.r, p[$ + 1] = H.g, p[$ + 2] = H.b);
|
|
1331
1331
|
}
|
|
1332
1332
|
}
|
|
1333
|
-
return j.setAttribute("position", new Cn(T, 3)), j.setAttribute("normal", new Cn(k, 3)),
|
|
1333
|
+
return j.setAttribute("position", new Cn(T, 3)), j.setAttribute("normal", new Cn(k, 3)), w && (j.setAttribute("color", new Cn(p, 3)), j.hasColors = !0, j.alpha = C), j;
|
|
1334
1334
|
}
|
|
1335
1335
|
function l(g) {
|
|
1336
1336
|
const L = new Gt(), D = /solid([\s\S]*?)endsolid/g, S = /facet([\s\S]*?)endfacet/g, A = /solid\s(.+)/;
|
|
1337
1337
|
let R = 0;
|
|
1338
|
-
const
|
|
1338
|
+
const w = /[\s]+([+-]?(?:\d*)(?:\.\d*)?(?:[eE][+-]?\d+)?)/.source, p = new RegExp("vertex" + w + w + w, "g"), N = new RegExp("normal" + w + w + w, "g"), x = [], O = [], C = [], _ = new ce();
|
|
1339
1339
|
let f, j = 0, T = 0, k = 0;
|
|
1340
1340
|
for (; (f = D.exec(g)) !== null; ) {
|
|
1341
1341
|
T = k;
|
|
@@ -1344,9 +1344,9 @@ class dn extends Kt {
|
|
|
1344
1344
|
let he = 0, m = 0;
|
|
1345
1345
|
const d = f[0];
|
|
1346
1346
|
for (; (f = N.exec(d)) !== null; )
|
|
1347
|
-
|
|
1347
|
+
_.x = parseFloat(f[1]), _.y = parseFloat(f[2]), _.z = parseFloat(f[3]), m++;
|
|
1348
1348
|
for (; (f = p.exec(d)) !== null; )
|
|
1349
|
-
x.push(parseFloat(f[1]), parseFloat(f[2]), parseFloat(f[3])), O.push(
|
|
1349
|
+
x.push(parseFloat(f[1]), parseFloat(f[2]), parseFloat(f[3])), O.push(_.x, _.y, _.z), he++, k++;
|
|
1350
1350
|
m !== 1 && console.error("THREE.STLLoader: Something isn't right with the normal of face number " + R), he !== 3 && console.error("THREE.STLLoader: Something isn't right with the vertices of face number " + R), R++;
|
|
1351
1351
|
}
|
|
1352
1352
|
const B = T, ie = k - T;
|
|
@@ -1390,7 +1390,7 @@ class xs extends To {
|
|
|
1390
1390
|
switch (d.image_type) {
|
|
1391
1391
|
// check indexed type
|
|
1392
1392
|
case S:
|
|
1393
|
-
case
|
|
1393
|
+
case w:
|
|
1394
1394
|
if (d.colormap_length > 256 || d.colormap_size !== 24 || d.colormap_type !== 1)
|
|
1395
1395
|
throw new Error("THREE.TGALoader: Invalid type colormap data for indexed type.");
|
|
1396
1396
|
break;
|
|
@@ -1416,20 +1416,20 @@ class xs extends To {
|
|
|
1416
1416
|
}
|
|
1417
1417
|
function r(d, I, $, G, de) {
|
|
1418
1418
|
let M, ae;
|
|
1419
|
-
const
|
|
1419
|
+
const W = $.pixel_size >> 3, K = $.width * $.height * W;
|
|
1420
1420
|
if (I && (ae = de.subarray(G, G += $.colormap_length * ($.colormap_size >> 3))), d) {
|
|
1421
1421
|
M = new Uint8Array(K);
|
|
1422
|
-
let
|
|
1423
|
-
const be = new Uint8Array(
|
|
1422
|
+
let Z, V, J, ge = 0;
|
|
1423
|
+
const be = new Uint8Array(W);
|
|
1424
1424
|
for (; ge < K; )
|
|
1425
|
-
if (
|
|
1426
|
-
for (J = 0; J <
|
|
1425
|
+
if (Z = de[G++], V = (Z & 127) + 1, Z & 128) {
|
|
1426
|
+
for (J = 0; J < W; ++J)
|
|
1427
1427
|
be[J] = de[G++];
|
|
1428
1428
|
for (J = 0; J < V; ++J)
|
|
1429
|
-
M.set(be, ge + J *
|
|
1430
|
-
ge +=
|
|
1429
|
+
M.set(be, ge + J * W);
|
|
1430
|
+
ge += W * V;
|
|
1431
1431
|
} else {
|
|
1432
|
-
for (V *=
|
|
1432
|
+
for (V *= W, J = 0; J < V; ++J)
|
|
1433
1433
|
M[ge + J] = de[G++];
|
|
1434
1434
|
ge += V;
|
|
1435
1435
|
}
|
|
@@ -1443,79 +1443,79 @@ class xs extends To {
|
|
|
1443
1443
|
palettes: ae
|
|
1444
1444
|
};
|
|
1445
1445
|
}
|
|
1446
|
-
function c(d, I, $, G, de, M, ae,
|
|
1447
|
-
const
|
|
1446
|
+
function c(d, I, $, G, de, M, ae, W, K) {
|
|
1447
|
+
const Z = K;
|
|
1448
1448
|
let V, J = 0, ge, be;
|
|
1449
1449
|
const ue = H.width;
|
|
1450
1450
|
for (be = I; be !== G; be += $)
|
|
1451
1451
|
for (ge = de; ge !== ae; ge += M, J++)
|
|
1452
|
-
V =
|
|
1452
|
+
V = W[J], d[(ge + ue * be) * 4 + 3] = 255, d[(ge + ue * be) * 4 + 2] = Z[V * 3 + 0], d[(ge + ue * be) * 4 + 1] = Z[V * 3 + 1], d[(ge + ue * be) * 4 + 0] = Z[V * 3 + 2];
|
|
1453
1453
|
return d;
|
|
1454
1454
|
}
|
|
1455
|
-
function l(d, I, $, G, de, M, ae,
|
|
1456
|
-
let K,
|
|
1455
|
+
function l(d, I, $, G, de, M, ae, W) {
|
|
1456
|
+
let K, Z = 0, V, J;
|
|
1457
1457
|
const ge = H.width;
|
|
1458
1458
|
for (J = I; J !== G; J += $)
|
|
1459
|
-
for (V = de; V !== ae; V += M,
|
|
1460
|
-
K =
|
|
1459
|
+
for (V = de; V !== ae; V += M, Z += 2)
|
|
1460
|
+
K = W[Z + 0] + (W[Z + 1] << 8), d[(V + ge * J) * 4 + 0] = (K & 31744) >> 7, d[(V + ge * J) * 4 + 1] = (K & 992) >> 2, d[(V + ge * J) * 4 + 2] = (K & 31) << 3, d[(V + ge * J) * 4 + 3] = K & 32768 ? 0 : 255;
|
|
1461
1461
|
return d;
|
|
1462
1462
|
}
|
|
1463
|
-
function y(d, I, $, G, de, M, ae,
|
|
1464
|
-
let K = 0,
|
|
1463
|
+
function y(d, I, $, G, de, M, ae, W) {
|
|
1464
|
+
let K = 0, Z, V;
|
|
1465
1465
|
const J = H.width;
|
|
1466
1466
|
for (V = I; V !== G; V += $)
|
|
1467
|
-
for (
|
|
1468
|
-
d[(
|
|
1467
|
+
for (Z = de; Z !== ae; Z += M, K += 3)
|
|
1468
|
+
d[(Z + J * V) * 4 + 3] = 255, d[(Z + J * V) * 4 + 2] = W[K + 0], d[(Z + J * V) * 4 + 1] = W[K + 1], d[(Z + J * V) * 4 + 0] = W[K + 2];
|
|
1469
1469
|
return d;
|
|
1470
1470
|
}
|
|
1471
|
-
function u(d, I, $, G, de, M, ae,
|
|
1472
|
-
let K = 0,
|
|
1471
|
+
function u(d, I, $, G, de, M, ae, W) {
|
|
1472
|
+
let K = 0, Z, V;
|
|
1473
1473
|
const J = H.width;
|
|
1474
1474
|
for (V = I; V !== G; V += $)
|
|
1475
|
-
for (
|
|
1476
|
-
d[(
|
|
1475
|
+
for (Z = de; Z !== ae; Z += M, K += 4)
|
|
1476
|
+
d[(Z + J * V) * 4 + 2] = W[K + 0], d[(Z + J * V) * 4 + 1] = W[K + 1], d[(Z + J * V) * 4 + 0] = W[K + 2], d[(Z + J * V) * 4 + 3] = W[K + 3];
|
|
1477
1477
|
return d;
|
|
1478
1478
|
}
|
|
1479
|
-
function b(d, I, $, G, de, M, ae,
|
|
1480
|
-
let K,
|
|
1479
|
+
function b(d, I, $, G, de, M, ae, W) {
|
|
1480
|
+
let K, Z = 0, V, J;
|
|
1481
1481
|
const ge = H.width;
|
|
1482
1482
|
for (J = I; J !== G; J += $)
|
|
1483
|
-
for (V = de; V !== ae; V += M,
|
|
1484
|
-
K =
|
|
1483
|
+
for (V = de; V !== ae; V += M, Z++)
|
|
1484
|
+
K = W[Z], d[(V + ge * J) * 4 + 0] = K, d[(V + ge * J) * 4 + 1] = K, d[(V + ge * J) * 4 + 2] = K, d[(V + ge * J) * 4 + 3] = 255;
|
|
1485
1485
|
return d;
|
|
1486
1486
|
}
|
|
1487
|
-
function g(d, I, $, G, de, M, ae,
|
|
1488
|
-
let K = 0,
|
|
1487
|
+
function g(d, I, $, G, de, M, ae, W) {
|
|
1488
|
+
let K = 0, Z, V;
|
|
1489
1489
|
const J = H.width;
|
|
1490
1490
|
for (V = I; V !== G; V += $)
|
|
1491
|
-
for (
|
|
1492
|
-
d[(
|
|
1491
|
+
for (Z = de; Z !== ae; Z += M, K += 2)
|
|
1492
|
+
d[(Z + J * V) * 4 + 0] = W[K + 0], d[(Z + J * V) * 4 + 1] = W[K + 0], d[(Z + J * V) * 4 + 2] = W[K + 0], d[(Z + J * V) * 4 + 3] = W[K + 1];
|
|
1493
1493
|
return d;
|
|
1494
1494
|
}
|
|
1495
1495
|
function L(d, I, $, G, de) {
|
|
1496
|
-
let M, ae,
|
|
1496
|
+
let M, ae, W, K, Z, V;
|
|
1497
1497
|
switch ((H.flags & x) >> O) {
|
|
1498
1498
|
default:
|
|
1499
1499
|
case f:
|
|
1500
|
-
M = 0,
|
|
1500
|
+
M = 0, W = 1, Z = I, ae = 0, K = 1, V = $;
|
|
1501
1501
|
break;
|
|
1502
1502
|
case C:
|
|
1503
|
-
M = 0,
|
|
1503
|
+
M = 0, W = 1, Z = I, ae = $ - 1, K = -1, V = -1;
|
|
1504
1504
|
break;
|
|
1505
1505
|
case j:
|
|
1506
|
-
M = I - 1,
|
|
1506
|
+
M = I - 1, W = -1, Z = -1, ae = 0, K = 1, V = $;
|
|
1507
1507
|
break;
|
|
1508
|
-
case
|
|
1509
|
-
M = I - 1,
|
|
1508
|
+
case _:
|
|
1509
|
+
M = I - 1, W = -1, Z = -1, ae = $ - 1, K = -1, V = -1;
|
|
1510
1510
|
break;
|
|
1511
1511
|
}
|
|
1512
1512
|
if (ie)
|
|
1513
1513
|
switch (H.pixel_size) {
|
|
1514
1514
|
case 8:
|
|
1515
|
-
b(d, ae, K, V, M,
|
|
1515
|
+
b(d, ae, K, V, M, W, Z, G);
|
|
1516
1516
|
break;
|
|
1517
1517
|
case 16:
|
|
1518
|
-
g(d, ae, K, V, M,
|
|
1518
|
+
g(d, ae, K, V, M, W, Z, G);
|
|
1519
1519
|
break;
|
|
1520
1520
|
default:
|
|
1521
1521
|
throw new Error("THREE.TGALoader: Format not supported.");
|
|
@@ -1523,23 +1523,23 @@ class xs extends To {
|
|
|
1523
1523
|
else
|
|
1524
1524
|
switch (H.pixel_size) {
|
|
1525
1525
|
case 8:
|
|
1526
|
-
c(d, ae, K, V, M,
|
|
1526
|
+
c(d, ae, K, V, M, W, Z, G, de);
|
|
1527
1527
|
break;
|
|
1528
1528
|
case 16:
|
|
1529
|
-
l(d, ae, K, V, M,
|
|
1529
|
+
l(d, ae, K, V, M, W, Z, G);
|
|
1530
1530
|
break;
|
|
1531
1531
|
case 24:
|
|
1532
|
-
y(d, ae, K, V, M,
|
|
1532
|
+
y(d, ae, K, V, M, W, Z, G);
|
|
1533
1533
|
break;
|
|
1534
1534
|
case 32:
|
|
1535
|
-
u(d, ae, K, V, M,
|
|
1535
|
+
u(d, ae, K, V, M, W, Z, G);
|
|
1536
1536
|
break;
|
|
1537
1537
|
default:
|
|
1538
1538
|
throw new Error("THREE.TGALoader: Format not supported.");
|
|
1539
1539
|
}
|
|
1540
1540
|
return d;
|
|
1541
1541
|
}
|
|
1542
|
-
const D = 0, S = 1, A = 2, R = 3,
|
|
1542
|
+
const D = 0, S = 1, A = 2, R = 3, w = 9, p = 10, N = 11, x = 48, O = 4, C = 0, _ = 1, f = 2, j = 3;
|
|
1543
1543
|
if (n.length < 19) throw new Error("THREE.TGALoader: Not enough data to contain header.");
|
|
1544
1544
|
let T = 0;
|
|
1545
1545
|
const k = new Uint8Array(n), H = {
|
|
@@ -1563,7 +1563,7 @@ class xs extends To {
|
|
|
1563
1563
|
T += H.id_length;
|
|
1564
1564
|
let F = !1, B = !1, ie = !1;
|
|
1565
1565
|
switch (H.image_type) {
|
|
1566
|
-
case
|
|
1566
|
+
case w:
|
|
1567
1567
|
F = !0, B = !0;
|
|
1568
1568
|
break;
|
|
1569
1569
|
case S:
|
|
@@ -1624,8 +1624,8 @@ class Ti extends Kt {
|
|
|
1624
1624
|
function r(t, e) {
|
|
1625
1625
|
const o = [], s = t.childNodes;
|
|
1626
1626
|
for (let i = 0, h = s.length; i < h; i++) {
|
|
1627
|
-
const
|
|
1628
|
-
|
|
1627
|
+
const v = s[i];
|
|
1628
|
+
v.nodeName === e && o.push(v);
|
|
1629
1629
|
}
|
|
1630
1630
|
return o;
|
|
1631
1631
|
}
|
|
@@ -1675,8 +1675,8 @@ class Ti extends Kt {
|
|
|
1675
1675
|
const i = r(t, e)[0];
|
|
1676
1676
|
if (i !== void 0) {
|
|
1677
1677
|
const h = r(i, o);
|
|
1678
|
-
for (let
|
|
1679
|
-
s(h[
|
|
1678
|
+
for (let v = 0; v < h.length; v++)
|
|
1679
|
+
s(h[v]);
|
|
1680
1680
|
}
|
|
1681
1681
|
}
|
|
1682
1682
|
function R(t, e) {
|
|
@@ -1685,7 +1685,7 @@ class Ti extends Kt {
|
|
|
1685
1685
|
s.build = e(t[o]);
|
|
1686
1686
|
}
|
|
1687
1687
|
}
|
|
1688
|
-
function
|
|
1688
|
+
function w(t, e) {
|
|
1689
1689
|
return t.build !== void 0 || (t.build = e(t)), t.build;
|
|
1690
1690
|
}
|
|
1691
1691
|
function p(t) {
|
|
@@ -1698,16 +1698,16 @@ class Ti extends Kt {
|
|
|
1698
1698
|
for (let s = 0, i = t.childNodes.length; s < i; s++) {
|
|
1699
1699
|
const h = t.childNodes[s];
|
|
1700
1700
|
if (h.nodeType !== 1) continue;
|
|
1701
|
-
let
|
|
1701
|
+
let v;
|
|
1702
1702
|
switch (h.nodeName) {
|
|
1703
1703
|
case "source":
|
|
1704
|
-
|
|
1704
|
+
v = h.getAttribute("id"), e.sources[v] = at(h);
|
|
1705
1705
|
break;
|
|
1706
1706
|
case "sampler":
|
|
1707
|
-
|
|
1707
|
+
v = h.getAttribute("id"), e.samplers[v] = N(h);
|
|
1708
1708
|
break;
|
|
1709
1709
|
case "channel":
|
|
1710
|
-
|
|
1710
|
+
v = h.getAttribute("target"), e.channels[v] = x(h);
|
|
1711
1711
|
break;
|
|
1712
1712
|
case "animation":
|
|
1713
1713
|
p(h), o = !0;
|
|
@@ -1727,8 +1727,8 @@ class Ti extends Kt {
|
|
|
1727
1727
|
if (i.nodeType === 1)
|
|
1728
1728
|
switch (i.nodeName) {
|
|
1729
1729
|
case "input":
|
|
1730
|
-
const h = u(i.getAttribute("source")),
|
|
1731
|
-
e.inputs[
|
|
1730
|
+
const h = u(i.getAttribute("source")), v = i.getAttribute("semantic");
|
|
1731
|
+
e.inputs[v] = h;
|
|
1732
1732
|
break;
|
|
1733
1733
|
}
|
|
1734
1734
|
}
|
|
@@ -1739,43 +1739,43 @@ class Ti extends Kt {
|
|
|
1739
1739
|
let s = t.getAttribute("target").split("/");
|
|
1740
1740
|
const i = s.shift();
|
|
1741
1741
|
let h = s.shift();
|
|
1742
|
-
const
|
|
1743
|
-
if (
|
|
1742
|
+
const v = h.indexOf("(") !== -1, X = h.indexOf(".") !== -1;
|
|
1743
|
+
if (X)
|
|
1744
1744
|
s = h.split("."), h = s.shift(), e.member = s.shift();
|
|
1745
|
-
else if (
|
|
1745
|
+
else if (v) {
|
|
1746
1746
|
const z = h.split("(");
|
|
1747
1747
|
h = z.shift();
|
|
1748
1748
|
for (let q = 0; q < z.length; q++)
|
|
1749
1749
|
z[q] = parseInt(z[q].replace(/\)/, ""));
|
|
1750
1750
|
e.indices = z;
|
|
1751
1751
|
}
|
|
1752
|
-
return e.id = i, e.sid = h, e.arraySyntax =
|
|
1752
|
+
return e.id = i, e.sid = h, e.arraySyntax = v, e.memberSyntax = X, e.sampler = u(t.getAttribute("source")), e;
|
|
1753
1753
|
}
|
|
1754
1754
|
function O(t) {
|
|
1755
1755
|
const e = [], o = t.channels, s = t.samplers, i = t.sources;
|
|
1756
1756
|
for (const h in o)
|
|
1757
1757
|
if (o.hasOwnProperty(h)) {
|
|
1758
|
-
const
|
|
1758
|
+
const v = o[h], X = s[v.sampler], z = X.inputs.INPUT, q = X.inputs.OUTPUT, te = i[z], P = i[q], ee = _(v, te, P);
|
|
1759
1759
|
H(ee, e);
|
|
1760
1760
|
}
|
|
1761
1761
|
return e;
|
|
1762
1762
|
}
|
|
1763
1763
|
function C(t) {
|
|
1764
|
-
return
|
|
1764
|
+
return w(re.animations[t], O);
|
|
1765
1765
|
}
|
|
1766
|
-
function
|
|
1767
|
-
const s = re.nodes[t.id], i = jt(s.id), h = s.transforms[t.sid],
|
|
1768
|
-
let
|
|
1766
|
+
function _(t, e, o) {
|
|
1767
|
+
const s = re.nodes[t.id], i = jt(s.id), h = s.transforms[t.sid], v = s.matrix.clone().transpose();
|
|
1768
|
+
let X, z, q, te, P, ee;
|
|
1769
1769
|
const Q = {};
|
|
1770
1770
|
switch (h) {
|
|
1771
1771
|
case "matrix":
|
|
1772
1772
|
for (q = 0, te = e.array.length; q < te; q++)
|
|
1773
|
-
if (
|
|
1773
|
+
if (X = e.array[q], z = q * o.stride, Q[X] === void 0 && (Q[X] = {}), t.arraySyntax === !0) {
|
|
1774
1774
|
const Ee = o.array[z], ke = t.indices[0] + 4 * t.indices[1];
|
|
1775
|
-
Q[
|
|
1775
|
+
Q[X][ke] = Ee;
|
|
1776
1776
|
} else
|
|
1777
1777
|
for (P = 0, ee = o.stride; P < ee; P++)
|
|
1778
|
-
Q[
|
|
1778
|
+
Q[X][P] = o.array[z + P];
|
|
1779
1779
|
break;
|
|
1780
1780
|
case "translate":
|
|
1781
1781
|
console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.', h);
|
|
@@ -1787,7 +1787,7 @@ class Ti extends Kt {
|
|
|
1787
1787
|
console.warn('THREE.ColladaLoader: Animation transform type "%s" not yet implemented.', h);
|
|
1788
1788
|
break;
|
|
1789
1789
|
}
|
|
1790
|
-
const se = f(Q,
|
|
1790
|
+
const se = f(Q, v);
|
|
1791
1791
|
return {
|
|
1792
1792
|
name: i.uuid,
|
|
1793
1793
|
keyframes: se
|
|
@@ -1807,19 +1807,19 @@ class Ti extends Kt {
|
|
|
1807
1807
|
}
|
|
1808
1808
|
const j = new ce(), T = new ce(), k = new pn();
|
|
1809
1809
|
function H(t, e) {
|
|
1810
|
-
const o = t.keyframes, s = t.name, i = [], h = [],
|
|
1810
|
+
const o = t.keyframes, s = t.name, i = [], h = [], v = [], X = [];
|
|
1811
1811
|
for (let z = 0, q = o.length; z < q; z++) {
|
|
1812
1812
|
const te = o[z], P = te.time, ee = te.value;
|
|
1813
|
-
Ke.fromArray(ee).transpose(), Ke.decompose(j, k, T), i.push(P), h.push(j.x, j.y, j.z),
|
|
1813
|
+
Ke.fromArray(ee).transpose(), Ke.decompose(j, k, T), i.push(P), h.push(j.x, j.y, j.z), v.push(k.x, k.y, k.z, k.w), X.push(T.x, T.y, T.z);
|
|
1814
1814
|
}
|
|
1815
|
-
return h.length > 0 && e.push(new hs(s + ".position", i, h)),
|
|
1815
|
+
return h.length > 0 && e.push(new hs(s + ".position", i, h)), v.length > 0 && e.push(new Lo(s + ".quaternion", i, v)), X.length > 0 && e.push(new hs(s + ".scale", i, X)), e;
|
|
1816
1816
|
}
|
|
1817
1817
|
function F(t, e, o) {
|
|
1818
|
-
let s, i = !0, h,
|
|
1819
|
-
for (h = 0,
|
|
1818
|
+
let s, i = !0, h, v;
|
|
1819
|
+
for (h = 0, v = t.length; h < v; h++)
|
|
1820
1820
|
s = t[h], s.value[e] === void 0 ? s.value[e] = null : i = !1;
|
|
1821
1821
|
if (i === !0)
|
|
1822
|
-
for (h = 0,
|
|
1822
|
+
for (h = 0, v = t.length; h < v; h++)
|
|
1823
1823
|
s = t[h], s.value[e] = o;
|
|
1824
1824
|
else
|
|
1825
1825
|
B(t, e);
|
|
@@ -1827,17 +1827,17 @@ class Ti extends Kt {
|
|
|
1827
1827
|
function B(t, e) {
|
|
1828
1828
|
let o, s;
|
|
1829
1829
|
for (let i = 0, h = t.length; i < h; i++) {
|
|
1830
|
-
const
|
|
1831
|
-
if (
|
|
1830
|
+
const v = t[i];
|
|
1831
|
+
if (v.value[e] === null) {
|
|
1832
1832
|
if (o = ie(t, i, e), s = he(t, i, e), o === null) {
|
|
1833
|
-
|
|
1833
|
+
v.value[e] = s.value[e];
|
|
1834
1834
|
continue;
|
|
1835
1835
|
}
|
|
1836
1836
|
if (s === null) {
|
|
1837
|
-
|
|
1837
|
+
v.value[e] = o.value[e];
|
|
1838
1838
|
continue;
|
|
1839
1839
|
}
|
|
1840
|
-
m(
|
|
1840
|
+
m(v, o, s, e);
|
|
1841
1841
|
}
|
|
1842
1842
|
}
|
|
1843
1843
|
}
|
|
@@ -1884,15 +1884,15 @@ class Ti extends Kt {
|
|
|
1884
1884
|
}
|
|
1885
1885
|
function I(t) {
|
|
1886
1886
|
const e = [], o = t.name, s = t.end - t.start || -1, i = t.animations;
|
|
1887
|
-
for (let h = 0,
|
|
1888
|
-
const
|
|
1889
|
-
for (let z = 0, q =
|
|
1890
|
-
e.push(
|
|
1887
|
+
for (let h = 0, v = i.length; h < v; h++) {
|
|
1888
|
+
const X = C(i[h]);
|
|
1889
|
+
for (let z = 0, q = X.length; z < q; z++)
|
|
1890
|
+
e.push(X[z]);
|
|
1891
1891
|
}
|
|
1892
1892
|
return new us(o, s, e);
|
|
1893
1893
|
}
|
|
1894
1894
|
function $(t) {
|
|
1895
|
-
return
|
|
1895
|
+
return w(re.clips[t], I);
|
|
1896
1896
|
}
|
|
1897
1897
|
function G(t) {
|
|
1898
1898
|
const e = {};
|
|
@@ -1944,8 +1944,8 @@ class Ti extends Kt {
|
|
|
1944
1944
|
if (i.nodeType === 1)
|
|
1945
1945
|
switch (i.nodeName) {
|
|
1946
1946
|
case "input":
|
|
1947
|
-
const h = i.getAttribute("semantic"),
|
|
1948
|
-
e.inputs[h] =
|
|
1947
|
+
const h = i.getAttribute("semantic"), v = u(i.getAttribute("source"));
|
|
1948
|
+
e.inputs[h] = v;
|
|
1949
1949
|
break;
|
|
1950
1950
|
}
|
|
1951
1951
|
}
|
|
@@ -1960,8 +1960,8 @@ class Ti extends Kt {
|
|
|
1960
1960
|
if (i.nodeType === 1)
|
|
1961
1961
|
switch (i.nodeName) {
|
|
1962
1962
|
case "input":
|
|
1963
|
-
const h = i.getAttribute("semantic"),
|
|
1964
|
-
e.inputs[h] = { id:
|
|
1963
|
+
const h = i.getAttribute("semantic"), v = u(i.getAttribute("source")), X = parseInt(i.getAttribute("offset"));
|
|
1964
|
+
e.inputs[h] = { id: v, offset: X };
|
|
1965
1965
|
break;
|
|
1966
1966
|
case "vcount":
|
|
1967
1967
|
e.vcount = y(i.textContent);
|
|
@@ -1973,7 +1973,7 @@ class Ti extends Kt {
|
|
|
1973
1973
|
}
|
|
1974
1974
|
return e;
|
|
1975
1975
|
}
|
|
1976
|
-
function
|
|
1976
|
+
function W(t) {
|
|
1977
1977
|
const e = {
|
|
1978
1978
|
id: t.id
|
|
1979
1979
|
}, o = re.geometries[e.id];
|
|
@@ -1991,12 +1991,12 @@ class Ti extends Kt {
|
|
|
1991
1991
|
array: [],
|
|
1992
1992
|
stride: 4
|
|
1993
1993
|
}
|
|
1994
|
-
}, s = t.sources, i = t.vertexWeights, h = i.vcount,
|
|
1994
|
+
}, s = t.sources, i = t.vertexWeights, h = i.vcount, v = i.v, X = i.inputs.JOINT.offset, z = i.inputs.WEIGHT.offset, q = t.sources[t.joints.inputs.JOINT], te = t.sources[t.joints.inputs.INV_BIND_MATRIX], P = s[i.inputs.WEIGHT.id].array;
|
|
1995
1995
|
let ee = 0, Q, se, ne;
|
|
1996
1996
|
for (Q = 0, ne = h.length; Q < ne; Q++) {
|
|
1997
1997
|
const ke = h[Q], we = [];
|
|
1998
1998
|
for (se = 0; se < ke; se++) {
|
|
1999
|
-
const _e =
|
|
1999
|
+
const _e = v[ee + X], dt = v[ee + z], Ve = P[dt];
|
|
2000
2000
|
we.push({ index: _e, weight: Ve }), ee += 2;
|
|
2001
2001
|
}
|
|
2002
2002
|
for (we.sort(Ee), se = 0; se < 4; se++) {
|
|
@@ -2013,8 +2013,8 @@ class Ti extends Kt {
|
|
|
2013
2013
|
return we.weight - ke.weight;
|
|
2014
2014
|
}
|
|
2015
2015
|
}
|
|
2016
|
-
function
|
|
2017
|
-
return
|
|
2016
|
+
function Z(t) {
|
|
2017
|
+
return w(re.controllers[t], W);
|
|
2018
2018
|
}
|
|
2019
2019
|
function V(t) {
|
|
2020
2020
|
const e = {
|
|
@@ -2027,7 +2027,7 @@ class Ti extends Kt {
|
|
|
2027
2027
|
}
|
|
2028
2028
|
function ge(t) {
|
|
2029
2029
|
const e = re.images[t];
|
|
2030
|
-
return e !== void 0 ?
|
|
2030
|
+
return e !== void 0 ? w(e, J) : (console.warn("THREE.ColladaLoader: Couldn't find image with ID:", t), null);
|
|
2031
2031
|
}
|
|
2032
2032
|
function be(t) {
|
|
2033
2033
|
const e = {};
|
|
@@ -2261,7 +2261,7 @@ class Ti extends Kt {
|
|
|
2261
2261
|
return t;
|
|
2262
2262
|
}
|
|
2263
2263
|
function Pt(t) {
|
|
2264
|
-
return
|
|
2264
|
+
return w(re.effects[t], pe);
|
|
2265
2265
|
}
|
|
2266
2266
|
function Lt(t) {
|
|
2267
2267
|
const e = {
|
|
@@ -2353,34 +2353,34 @@ class Ti extends Kt {
|
|
|
2353
2353
|
}
|
|
2354
2354
|
}
|
|
2355
2355
|
Et.colorSpaceToWorking(s.color, Oe), s.specular && Et.colorSpaceToWorking(s.specular, Oe), s.emissive && Et.colorSpaceToWorking(s.emissive, Oe);
|
|
2356
|
-
let
|
|
2357
|
-
if (
|
|
2356
|
+
let v = h.transparent, X = h.transparency;
|
|
2357
|
+
if (X === void 0 && v && (X = {
|
|
2358
2358
|
float: 1
|
|
2359
|
-
}),
|
|
2359
|
+
}), v === void 0 && X && (v = {
|
|
2360
2360
|
opaque: "A_ONE",
|
|
2361
2361
|
data: {
|
|
2362
2362
|
color: [1, 1, 1, 1]
|
|
2363
2363
|
}
|
|
2364
|
-
}),
|
|
2365
|
-
if (
|
|
2364
|
+
}), v && X)
|
|
2365
|
+
if (v.data.texture)
|
|
2366
2366
|
s.transparent = !0;
|
|
2367
2367
|
else {
|
|
2368
|
-
const z =
|
|
2369
|
-
switch (
|
|
2368
|
+
const z = v.data.color;
|
|
2369
|
+
switch (v.opaque) {
|
|
2370
2370
|
case "A_ONE":
|
|
2371
|
-
s.opacity = z[3] *
|
|
2371
|
+
s.opacity = z[3] * X.float;
|
|
2372
2372
|
break;
|
|
2373
2373
|
case "RGB_ZERO":
|
|
2374
|
-
s.opacity = 1 - z[0] *
|
|
2374
|
+
s.opacity = 1 - z[0] * X.float;
|
|
2375
2375
|
break;
|
|
2376
2376
|
case "A_ZERO":
|
|
2377
|
-
s.opacity = 1 - z[3] *
|
|
2377
|
+
s.opacity = 1 - z[3] * X.float;
|
|
2378
2378
|
break;
|
|
2379
2379
|
case "RGB_ONE":
|
|
2380
|
-
s.opacity = z[0] *
|
|
2380
|
+
s.opacity = z[0] * X.float;
|
|
2381
2381
|
break;
|
|
2382
2382
|
default:
|
|
2383
|
-
console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.',
|
|
2383
|
+
console.warn('THREE.ColladaLoader: Invalid opaque type "%s" of transparent tag.', v.opaque);
|
|
2384
2384
|
}
|
|
2385
2385
|
s.opacity < 1 && (s.transparent = !0);
|
|
2386
2386
|
}
|
|
@@ -2401,7 +2401,7 @@ class Ti extends Kt {
|
|
|
2401
2401
|
return s;
|
|
2402
2402
|
}
|
|
2403
2403
|
function xt(t) {
|
|
2404
|
-
return
|
|
2404
|
+
return w(re.materials[t], ft);
|
|
2405
2405
|
}
|
|
2406
2406
|
function St(t) {
|
|
2407
2407
|
const e = {
|
|
@@ -2491,7 +2491,7 @@ class Ti extends Kt {
|
|
|
2491
2491
|
}
|
|
2492
2492
|
function Ae(t) {
|
|
2493
2493
|
const e = re.cameras[t];
|
|
2494
|
-
return e !== void 0 ?
|
|
2494
|
+
return e !== void 0 ? w(e, ve) : (console.warn("THREE.ColladaLoader: Couldn't find camera with ID:", t), null);
|
|
2495
2495
|
}
|
|
2496
2496
|
function Je(t) {
|
|
2497
2497
|
let e = {};
|
|
@@ -2535,8 +2535,8 @@ class Ti extends Kt {
|
|
|
2535
2535
|
e.falloffAngle = parseFloat(i.textContent);
|
|
2536
2536
|
break;
|
|
2537
2537
|
case "quadratic_attenuation":
|
|
2538
|
-
const
|
|
2539
|
-
e.distance =
|
|
2538
|
+
const v = parseFloat(i.textContent);
|
|
2539
|
+
e.distance = v ? Math.sqrt(1 / v) : 0;
|
|
2540
2540
|
break;
|
|
2541
2541
|
}
|
|
2542
2542
|
}
|
|
@@ -2562,7 +2562,7 @@ class Ti extends Kt {
|
|
|
2562
2562
|
}
|
|
2563
2563
|
function rt(t) {
|
|
2564
2564
|
const e = re.lights[t];
|
|
2565
|
-
return e !== void 0 ?
|
|
2565
|
+
return e !== void 0 ? w(e, Ye) : (console.warn("THREE.ColladaLoader: Couldn't find light with ID:", t), null);
|
|
2566
2566
|
}
|
|
2567
2567
|
function lt(t) {
|
|
2568
2568
|
const e = {
|
|
@@ -2644,8 +2644,8 @@ class Ti extends Kt {
|
|
|
2644
2644
|
if (i.nodeType === 1)
|
|
2645
2645
|
switch (i.nodeName) {
|
|
2646
2646
|
case "input":
|
|
2647
|
-
const h = u(i.getAttribute("source")),
|
|
2648
|
-
e.inputs[q] = { id: h, offset:
|
|
2647
|
+
const h = u(i.getAttribute("source")), v = i.getAttribute("semantic"), X = parseInt(i.getAttribute("offset")), z = parseInt(i.getAttribute("set")), q = z > 0 ? v + z : v;
|
|
2648
|
+
e.inputs[q] = { id: h, offset: X }, e.stride = Math.max(e.stride, X + 1), v === "TEXCOORD" && (e.hasUV = !0);
|
|
2649
2649
|
break;
|
|
2650
2650
|
case "vcount":
|
|
2651
2651
|
e.vcount = y(i.textContent);
|
|
@@ -2675,14 +2675,14 @@ class Ti extends Kt {
|
|
|
2675
2675
|
const e = {}, o = t.sources, s = t.vertices, i = t.primitives;
|
|
2676
2676
|
if (i.length === 0) return {};
|
|
2677
2677
|
const h = gt(i);
|
|
2678
|
-
for (const
|
|
2679
|
-
const
|
|
2680
|
-
ct(
|
|
2678
|
+
for (const v in h) {
|
|
2679
|
+
const X = h[v];
|
|
2680
|
+
ct(X), e[v] = Us(X, o, s);
|
|
2681
2681
|
}
|
|
2682
2682
|
return e;
|
|
2683
2683
|
}
|
|
2684
2684
|
function Us(t, e, o) {
|
|
2685
|
-
const s = {}, i = { array: [], stride: 0 }, h = { array: [], stride: 0 },
|
|
2685
|
+
const s = {}, i = { array: [], stride: 0 }, h = { array: [], stride: 0 }, v = { array: [], stride: 0 }, X = { array: [], stride: 0 }, z = { array: [], stride: 0 }, q = { array: [], stride: 4 }, te = { array: [], stride: 4 }, P = new Gt(), ee = [];
|
|
2686
2686
|
let Q = 0;
|
|
2687
2687
|
for (let se = 0; se < t.length; se++) {
|
|
2688
2688
|
const ne = t[se], Ee = ne.inputs;
|
|
@@ -2727,7 +2727,7 @@ class Ti extends Kt {
|
|
|
2727
2727
|
if (st(ne, e[Ve], _e.offset, i.array), i.stride = e[Ve].stride, e.skinWeights && e.skinIndices && (st(ne, e.skinIndices, _e.offset, q.array), st(ne, e.skinWeights, _e.offset, te.array)), ne.hasUV === !1 && t.uvsNeedsFix === !0) {
|
|
2728
2728
|
const mo = (i.array.length - Ot) / i.stride;
|
|
2729
2729
|
for (let rs = 0; rs < mo; rs++)
|
|
2730
|
-
|
|
2730
|
+
v.array.push(0, 0);
|
|
2731
2731
|
}
|
|
2732
2732
|
break;
|
|
2733
2733
|
case "NORMAL":
|
|
@@ -2737,10 +2737,10 @@ class Ti extends Kt {
|
|
|
2737
2737
|
st(ne, e[Ve], _e.offset, z.array), z.stride = e[Ve].stride;
|
|
2738
2738
|
break;
|
|
2739
2739
|
case "TEXCOORD":
|
|
2740
|
-
st(ne, e[Ve], _e.offset,
|
|
2740
|
+
st(ne, e[Ve], _e.offset, v.array), v.stride = e[Ve].stride;
|
|
2741
2741
|
break;
|
|
2742
2742
|
case "TEXCOORD1":
|
|
2743
|
-
st(ne, e[Ve], _e.offset,
|
|
2743
|
+
st(ne, e[Ve], _e.offset, X.array), v.stride = e[Ve].stride;
|
|
2744
2744
|
break;
|
|
2745
2745
|
default:
|
|
2746
2746
|
console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.', dt);
|
|
@@ -2754,18 +2754,18 @@ class Ti extends Kt {
|
|
|
2754
2754
|
st(ne, e[_e.id], _e.offset, z.array, !0), z.stride = e[_e.id].stride;
|
|
2755
2755
|
break;
|
|
2756
2756
|
case "TEXCOORD":
|
|
2757
|
-
st(ne, e[_e.id], _e.offset,
|
|
2757
|
+
st(ne, e[_e.id], _e.offset, v.array), v.stride = e[_e.id].stride;
|
|
2758
2758
|
break;
|
|
2759
2759
|
case "TEXCOORD1":
|
|
2760
|
-
st(ne, e[_e.id], _e.offset,
|
|
2760
|
+
st(ne, e[_e.id], _e.offset, X.array), X.stride = e[_e.id].stride;
|
|
2761
2761
|
break;
|
|
2762
2762
|
}
|
|
2763
2763
|
}
|
|
2764
2764
|
}
|
|
2765
|
-
return i.array.length > 0 && P.setAttribute("position", new Ue(i.array, i.stride)), h.array.length > 0 && P.setAttribute("normal", new Ue(h.array, h.stride)), z.array.length > 0 && P.setAttribute("color", new Ue(z.array, z.stride)),
|
|
2765
|
+
return i.array.length > 0 && P.setAttribute("position", new Ue(i.array, i.stride)), h.array.length > 0 && P.setAttribute("normal", new Ue(h.array, h.stride)), z.array.length > 0 && P.setAttribute("color", new Ue(z.array, z.stride)), v.array.length > 0 && P.setAttribute("uv", new Ue(v.array, v.stride)), X.array.length > 0 && P.setAttribute("uv1", new Ue(X.array, X.stride)), q.array.length > 0 && P.setAttribute("skinIndex", new Ue(q.array, q.stride)), te.array.length > 0 && P.setAttribute("skinWeight", new Ue(te.array, te.stride)), s.data = P, s.type = t[0].type, s.materialKeys = ee, s;
|
|
2766
2766
|
}
|
|
2767
2767
|
function st(t, e, o, s, i = !1) {
|
|
2768
|
-
const h = t.p,
|
|
2768
|
+
const h = t.p, v = t.stride, X = t.vcount;
|
|
2769
2769
|
function z(P) {
|
|
2770
2770
|
let ee = h[P + o] * te;
|
|
2771
2771
|
const Q = ee + te;
|
|
@@ -2784,27 +2784,27 @@ class Ti extends Kt {
|
|
|
2784
2784
|
const q = e.array, te = e.stride;
|
|
2785
2785
|
if (t.vcount !== void 0) {
|
|
2786
2786
|
let P = 0;
|
|
2787
|
-
for (let ee = 0, Q =
|
|
2788
|
-
const se =
|
|
2787
|
+
for (let ee = 0, Q = X.length; ee < Q; ee++) {
|
|
2788
|
+
const se = X[ee];
|
|
2789
2789
|
if (se === 4) {
|
|
2790
|
-
const ne = P +
|
|
2790
|
+
const ne = P + v * 0, Ee = P + v * 1, ke = P + v * 2, we = P + v * 3;
|
|
2791
2791
|
z(ne), z(Ee), z(we), z(Ee), z(ke), z(we);
|
|
2792
2792
|
} else if (se === 3) {
|
|
2793
|
-
const ne = P +
|
|
2793
|
+
const ne = P + v * 0, Ee = P + v * 1, ke = P + v * 2;
|
|
2794
2794
|
z(ne), z(Ee), z(ke);
|
|
2795
2795
|
} else if (se > 4)
|
|
2796
2796
|
for (let ne = 1, Ee = se - 2; ne <= Ee; ne++) {
|
|
2797
|
-
const ke = P +
|
|
2797
|
+
const ke = P + v * 0, we = P + v * ne, _e = P + v * (ne + 1);
|
|
2798
2798
|
z(ke), z(we), z(_e);
|
|
2799
2799
|
}
|
|
2800
|
-
P +=
|
|
2800
|
+
P += v * se;
|
|
2801
2801
|
}
|
|
2802
2802
|
} else
|
|
2803
|
-
for (let P = 0, ee = h.length; P < ee; P +=
|
|
2803
|
+
for (let P = 0, ee = h.length; P < ee; P += v)
|
|
2804
2804
|
z(P);
|
|
2805
2805
|
}
|
|
2806
2806
|
function Kn(t) {
|
|
2807
|
-
return
|
|
2807
|
+
return w(re.geometries[t], Dt);
|
|
2808
2808
|
}
|
|
2809
2809
|
function Bs(t) {
|
|
2810
2810
|
const e = {
|
|
@@ -2827,7 +2827,7 @@ class Ti extends Kt {
|
|
|
2827
2827
|
return t.build !== void 0 ? t.build : t;
|
|
2828
2828
|
}
|
|
2829
2829
|
function Vs(t) {
|
|
2830
|
-
return
|
|
2830
|
+
return w(re.kinematicsModels[t], zs);
|
|
2831
2831
|
}
|
|
2832
2832
|
function Hs(t, e) {
|
|
2833
2833
|
for (let o = 0; o < t.childNodes.length; o++) {
|
|
@@ -2880,8 +2880,8 @@ class Ti extends Kt {
|
|
|
2880
2880
|
e.axis.fromArray(i);
|
|
2881
2881
|
break;
|
|
2882
2882
|
case "limits":
|
|
2883
|
-
const h = s.getElementsByTagName("max")[0],
|
|
2884
|
-
e.limits.max = parseFloat(h.textContent), e.limits.min = parseFloat(
|
|
2883
|
+
const h = s.getElementsByTagName("max")[0], v = s.getElementsByTagName("min")[0];
|
|
2884
|
+
e.limits.max = parseFloat(h.textContent), e.limits.min = parseFloat(v.textContent);
|
|
2885
2885
|
break;
|
|
2886
2886
|
}
|
|
2887
2887
|
}
|
|
@@ -3027,14 +3027,14 @@ class Ti extends Kt {
|
|
|
3027
3027
|
return t.build !== void 0 ? t.build : t;
|
|
3028
3028
|
}
|
|
3029
3029
|
function Qs(t) {
|
|
3030
|
-
return
|
|
3030
|
+
return w(re.kinematicsScenes[t], Js);
|
|
3031
3031
|
}
|
|
3032
3032
|
function eo() {
|
|
3033
3033
|
const t = Object.keys(re.kinematicsModels)[0], e = Object.keys(re.kinematicsScenes)[0], o = Object.keys(re.visualScenes)[0];
|
|
3034
3034
|
if (t === void 0 || e === void 0) return;
|
|
3035
|
-
const s = Vs(t), i = Qs(e), h = ns(o),
|
|
3036
|
-
for (let te = 0, P =
|
|
3037
|
-
const ee =
|
|
3035
|
+
const s = Vs(t), i = Qs(e), h = ns(o), v = i.bindJointAxis, X = {};
|
|
3036
|
+
for (let te = 0, P = v.length; te < P; te++) {
|
|
3037
|
+
const ee = v[te], Q = Le.querySelector('[sid="' + ee.target + '"]');
|
|
3038
3038
|
if (Q) {
|
|
3039
3039
|
const se = Q.parentElement;
|
|
3040
3040
|
z(ee.jointIndex, se);
|
|
@@ -3043,7 +3043,7 @@ class Ti extends Kt {
|
|
|
3043
3043
|
function z(te, P) {
|
|
3044
3044
|
const ee = P.getAttribute("name"), Q = s.joints[te];
|
|
3045
3045
|
h.traverse(function(se) {
|
|
3046
|
-
se.name === ee && (
|
|
3046
|
+
se.name === ee && (X[te] = {
|
|
3047
3047
|
object: se,
|
|
3048
3048
|
transforms: to(P),
|
|
3049
3049
|
joint: Q,
|
|
@@ -3055,13 +3055,13 @@ class Ti extends Kt {
|
|
|
3055
3055
|
as = {
|
|
3056
3056
|
joints: s && s.joints,
|
|
3057
3057
|
getJointValue: function(te) {
|
|
3058
|
-
const P =
|
|
3058
|
+
const P = X[te];
|
|
3059
3059
|
if (P)
|
|
3060
3060
|
return P.position;
|
|
3061
3061
|
console.warn("THREE.ColladaLoader: Joint " + te + " doesn't exist.");
|
|
3062
3062
|
},
|
|
3063
3063
|
setJointValue: function(te, P) {
|
|
3064
|
-
const ee =
|
|
3064
|
+
const ee = X[te];
|
|
3065
3065
|
if (ee) {
|
|
3066
3066
|
const Q = ee.joint;
|
|
3067
3067
|
if (P > Q.limits.max || P < Q.limits.min)
|
|
@@ -3101,7 +3101,7 @@ class Ti extends Kt {
|
|
|
3101
3101
|
break;
|
|
3102
3102
|
}
|
|
3103
3103
|
}
|
|
3104
|
-
se.matrix.copy(Ke), se.matrix.decompose(se.position, se.quaternion, se.scale),
|
|
3104
|
+
se.matrix.copy(Ke), se.matrix.decompose(se.position, se.quaternion, se.scale), X[te].position = P;
|
|
3105
3105
|
}
|
|
3106
3106
|
} else
|
|
3107
3107
|
console.log("THREE.ColladaLoader: " + te + " does not exist.");
|
|
@@ -3113,32 +3113,32 @@ class Ti extends Kt {
|
|
|
3113
3113
|
for (let s = 0; s < o.childNodes.length; s++) {
|
|
3114
3114
|
const i = o.childNodes[s];
|
|
3115
3115
|
if (i.nodeType !== 1) continue;
|
|
3116
|
-
let h,
|
|
3116
|
+
let h, v;
|
|
3117
3117
|
switch (i.nodeName) {
|
|
3118
3118
|
case "matrix":
|
|
3119
3119
|
h = l(i.textContent);
|
|
3120
|
-
const
|
|
3120
|
+
const X = new ut().fromArray(h).transpose();
|
|
3121
3121
|
e.push({
|
|
3122
3122
|
sid: i.getAttribute("sid"),
|
|
3123
3123
|
type: i.nodeName,
|
|
3124
|
-
obj:
|
|
3124
|
+
obj: X
|
|
3125
3125
|
});
|
|
3126
3126
|
break;
|
|
3127
3127
|
case "translate":
|
|
3128
3128
|
case "scale":
|
|
3129
|
-
h = l(i.textContent),
|
|
3129
|
+
h = l(i.textContent), v = new ce().fromArray(h), e.push({
|
|
3130
3130
|
sid: i.getAttribute("sid"),
|
|
3131
3131
|
type: i.nodeName,
|
|
3132
|
-
obj:
|
|
3132
|
+
obj: v
|
|
3133
3133
|
});
|
|
3134
3134
|
break;
|
|
3135
3135
|
case "rotate":
|
|
3136
|
-
h = l(i.textContent),
|
|
3136
|
+
h = l(i.textContent), v = new ce().fromArray(h);
|
|
3137
3137
|
const z = Ut.degToRad(h[3]);
|
|
3138
3138
|
e.push({
|
|
3139
3139
|
sid: i.getAttribute("sid"),
|
|
3140
3140
|
type: i.nodeName,
|
|
3141
|
-
obj:
|
|
3141
|
+
obj: v,
|
|
3142
3142
|
angle: z
|
|
3143
3143
|
});
|
|
3144
3144
|
break;
|
|
@@ -3226,8 +3226,8 @@ class Ti extends Kt {
|
|
|
3226
3226
|
case "bind_material":
|
|
3227
3227
|
const i = s.getElementsByTagName("instance_material");
|
|
3228
3228
|
for (let h = 0; h < i.length; h++) {
|
|
3229
|
-
const
|
|
3230
|
-
e.materials[
|
|
3229
|
+
const v = i[h], X = v.getAttribute("symbol"), z = v.getAttribute("target");
|
|
3230
|
+
e.materials[X] = u(z);
|
|
3231
3231
|
}
|
|
3232
3232
|
break;
|
|
3233
3233
|
case "skeleton":
|
|
@@ -3239,7 +3239,7 @@ class Ti extends Kt {
|
|
|
3239
3239
|
}
|
|
3240
3240
|
function so(t, e) {
|
|
3241
3241
|
const o = [], s = [];
|
|
3242
|
-
let i, h,
|
|
3242
|
+
let i, h, v;
|
|
3243
3243
|
for (i = 0; i < t.length; i++) {
|
|
3244
3244
|
const q = t[i];
|
|
3245
3245
|
let te;
|
|
@@ -3259,25 +3259,25 @@ class Ti extends Kt {
|
|
|
3259
3259
|
}
|
|
3260
3260
|
for (i = 0; i < e.length; i++)
|
|
3261
3261
|
for (h = 0; h < o.length; h++)
|
|
3262
|
-
if (
|
|
3263
|
-
s[i] =
|
|
3262
|
+
if (v = o[h], v.bone.name === e[i].name) {
|
|
3263
|
+
s[i] = v, v.processed = !0;
|
|
3264
3264
|
break;
|
|
3265
3265
|
}
|
|
3266
3266
|
for (i = 0; i < o.length; i++)
|
|
3267
|
-
|
|
3268
|
-
const
|
|
3267
|
+
v = o[i], v.processed === !1 && (s.push(v), v.processed = !0);
|
|
3268
|
+
const X = [], z = [];
|
|
3269
3269
|
for (i = 0; i < s.length; i++)
|
|
3270
|
-
|
|
3271
|
-
return new Do(
|
|
3270
|
+
v = s[i], X.push(v.bone), z.push(v.boneInverse);
|
|
3271
|
+
return new Do(X, z);
|
|
3272
3272
|
}
|
|
3273
3273
|
function Jn(t, e, o) {
|
|
3274
3274
|
t.traverse(function(s) {
|
|
3275
3275
|
if (s.isBone === !0) {
|
|
3276
3276
|
let i;
|
|
3277
3277
|
for (let h = 0; h < e.length; h++) {
|
|
3278
|
-
const
|
|
3279
|
-
if (
|
|
3280
|
-
i =
|
|
3278
|
+
const v = e[h];
|
|
3279
|
+
if (v.name === s.name) {
|
|
3280
|
+
i = v.boneInverse;
|
|
3281
3281
|
break;
|
|
3282
3282
|
}
|
|
3283
3283
|
}
|
|
@@ -3286,22 +3286,22 @@ class Ti extends Kt {
|
|
|
3286
3286
|
});
|
|
3287
3287
|
}
|
|
3288
3288
|
function oo(t) {
|
|
3289
|
-
const e = [], o = t.matrix, s = t.nodes, i = t.type, h = t.instanceCameras,
|
|
3289
|
+
const e = [], o = t.matrix, s = t.nodes, i = t.type, h = t.instanceCameras, v = t.instanceControllers, X = t.instanceLights, z = t.instanceGeometries, q = t.instanceNodes;
|
|
3290
3290
|
for (let P = 0, ee = s.length; P < ee; P++)
|
|
3291
3291
|
e.push(jt(s[P]));
|
|
3292
3292
|
for (let P = 0, ee = h.length; P < ee; P++) {
|
|
3293
3293
|
const Q = Ae(h[P]);
|
|
3294
3294
|
Q !== null && e.push(Q.clone());
|
|
3295
3295
|
}
|
|
3296
|
-
for (let P = 0, ee =
|
|
3297
|
-
const Q =
|
|
3296
|
+
for (let P = 0, ee = v.length; P < ee; P++) {
|
|
3297
|
+
const Q = v[P], se = Z(Q.id), ne = Kn(se.id), Ee = Qn(ne, Q.materials), ke = Q.skeletons, we = se.skin.joints, _e = so(ke, we);
|
|
3298
3298
|
for (let dt = 0, Ve = Ee.length; dt < Ve; dt++) {
|
|
3299
3299
|
const Ot = Ee[dt];
|
|
3300
3300
|
Ot.isSkinnedMesh && (Ot.bind(_e, se.skin.bindMatrix), Ot.normalizeSkinWeights()), e.push(Ot);
|
|
3301
3301
|
}
|
|
3302
3302
|
}
|
|
3303
|
-
for (let P = 0, ee =
|
|
3304
|
-
const Q = rt(
|
|
3303
|
+
for (let P = 0, ee = X.length; P < ee; P++) {
|
|
3304
|
+
const Q = rt(X[P]);
|
|
3305
3305
|
Q !== null && e.push(Q.clone());
|
|
3306
3306
|
}
|
|
3307
3307
|
for (let P = 0, ee = z.length; P < ee; P++) {
|
|
@@ -3345,18 +3345,18 @@ class Ti extends Kt {
|
|
|
3345
3345
|
ee.color.copy(P.color), ee.opacity = P.opacity, ee.transparent = P.transparent, h[q] = ee;
|
|
3346
3346
|
}
|
|
3347
3347
|
}
|
|
3348
|
-
const
|
|
3348
|
+
const v = i.data.attributes.skinIndex !== void 0, X = h.length === 1 ? h[0] : h;
|
|
3349
3349
|
let z;
|
|
3350
3350
|
switch (s) {
|
|
3351
3351
|
case "lines":
|
|
3352
|
-
z = new Dn(i.data,
|
|
3352
|
+
z = new Dn(i.data, X);
|
|
3353
3353
|
break;
|
|
3354
3354
|
case "linestrips":
|
|
3355
|
-
z = new Ls(i.data,
|
|
3355
|
+
z = new Ls(i.data, X);
|
|
3356
3356
|
break;
|
|
3357
3357
|
case "triangles":
|
|
3358
3358
|
case "polylist":
|
|
3359
|
-
|
|
3359
|
+
v ? z = new Ro(i.data, X) : z = new Ze(i.data, X);
|
|
3360
3360
|
break;
|
|
3361
3361
|
}
|
|
3362
3362
|
o.push(z);
|
|
@@ -3367,7 +3367,7 @@ class Ti extends Kt {
|
|
|
3367
3367
|
return re.nodes[t] !== void 0;
|
|
3368
3368
|
}
|
|
3369
3369
|
function jt(t) {
|
|
3370
|
-
return
|
|
3370
|
+
return w(re.nodes[t], oo);
|
|
3371
3371
|
}
|
|
3372
3372
|
function ro(t) {
|
|
3373
3373
|
const e = {
|
|
@@ -3394,7 +3394,7 @@ class Ti extends Kt {
|
|
|
3394
3394
|
return re.visualScenes[t] !== void 0;
|
|
3395
3395
|
}
|
|
3396
3396
|
function ns(t) {
|
|
3397
|
-
return
|
|
3397
|
+
return w(re.visualScenes[t], ts);
|
|
3398
3398
|
}
|
|
3399
3399
|
function co(t) {
|
|
3400
3400
|
const e = r(t, "instance_visual_scene")[0];
|
|
@@ -3459,7 +3459,7 @@ class Ti extends Kt {
|
|
|
3459
3459
|
physicsModels: {},
|
|
3460
3460
|
kinematicsScenes: {}
|
|
3461
3461
|
};
|
|
3462
|
-
A(Le, "library_animations", "animation", p), A(Le, "library_animation_clips", "animation_clip", d), A(Le, "library_controllers", "controller", G), A(Le, "library_images", "image", V), A(Le, "library_effects", "effect", be), A(Le, "library_materials", "material", Lt), A(Le, "library_cameras", "camera", St), A(Le, "library_lights", "light", Je), A(Le, "library_geometries", "geometry", lt), A(Le, "library_nodes", "node", _n), A(Le, "library_visual_scenes", "visual_scene", ro), A(Le, "library_kinematics_models", "kinematics_model", Bs), A(Le, "library_physics_models", "physics_model", Ys), A(Le, "scene", "instance_kinematics_scene", Zs), R(re.animations, O), R(re.clips, I), R(re.controllers,
|
|
3462
|
+
A(Le, "library_animations", "animation", p), A(Le, "library_animation_clips", "animation_clip", d), A(Le, "library_controllers", "controller", G), A(Le, "library_images", "image", V), A(Le, "library_effects", "effect", be), A(Le, "library_materials", "material", Lt), A(Le, "library_cameras", "camera", St), A(Le, "library_lights", "light", Je), A(Le, "library_geometries", "geometry", lt), A(Le, "library_nodes", "node", _n), A(Le, "library_visual_scenes", "visual_scene", ro), A(Le, "library_kinematics_models", "kinematics_model", Bs), A(Le, "library_physics_models", "physics_model", Ys), A(Le, "scene", "instance_kinematics_scene", Zs), R(re.animations, O), R(re.clips, I), R(re.controllers, W), R(re.images, J), R(re.effects, pe), R(re.materials, ft), R(re.cameras, ve), R(re.lights, Ye), R(re.geometries, Dt), R(re.visualScenes, ts), uo(), eo();
|
|
3463
3463
|
const Jt = co(r(Le, "scene")[0]);
|
|
3464
3464
|
return Jt.animations = Xt, os.upAxis === "Z_UP" && (console.warn("THREE.ColladaLoader: You are loading an asset with a Z-UP coordinate system. The loader just rotates the asset to transform it into Y-UP. The vertex data are not converted, see #24289."), Jt.rotation.set(-Math.PI / 2, 0, 0)), Jt.scale.multiplyScalar(os.unit), {
|
|
3465
3465
|
get animations() {
|
|
@@ -3519,11 +3519,11 @@ class Ei {
|
|
|
3519
3519
|
function S(x) {
|
|
3520
3520
|
let O;
|
|
3521
3521
|
x instanceof Document ? O = [...x.children] : x instanceof Element ? O = [x] : O = [...new DOMParser().parseFromString(x, "text/xml").children];
|
|
3522
|
-
const C = O.filter((
|
|
3522
|
+
const C = O.filter((_) => _.nodeName === "robot").pop();
|
|
3523
3523
|
return A(C);
|
|
3524
3524
|
}
|
|
3525
3525
|
function A(x) {
|
|
3526
|
-
const O = [...x.children], C = O.filter((F) => F.nodeName.toLowerCase() === "link"),
|
|
3526
|
+
const O = [...x.children], C = O.filter((F) => F.nodeName.toLowerCase() === "link"), _ = O.filter((F) => F.nodeName.toLowerCase() === "joint"), f = O.filter((F) => F.nodeName.toLowerCase() === "material"), j = new Fo();
|
|
3527
3527
|
j.robotName = x.getAttribute("name"), j.urdfRobotNode = x, f.forEach((F) => {
|
|
3528
3528
|
const B = F.getAttribute("name");
|
|
3529
3529
|
L[B] = p(F);
|
|
@@ -3531,8 +3531,8 @@ class Ei {
|
|
|
3531
3531
|
const T = {}, k = {};
|
|
3532
3532
|
C.forEach((F) => {
|
|
3533
3533
|
const B = F.getAttribute("name"), ie = x.querySelector(`child[link="${B}"]`) === null;
|
|
3534
|
-
b[B] =
|
|
3535
|
-
}),
|
|
3534
|
+
b[B] = w(F, T, k, ie ? j : null);
|
|
3535
|
+
}), _.forEach((F) => {
|
|
3536
3536
|
const B = F.getAttribute("name");
|
|
3537
3537
|
g[B] = R(F);
|
|
3538
3538
|
}), j.joints = g, j.links = b, j.colliders = k, j.visual = T;
|
|
@@ -3557,47 +3557,47 @@ class Ei {
|
|
|
3557
3557
|
}
|
|
3558
3558
|
function R(x) {
|
|
3559
3559
|
const O = [...x.children], C = x.getAttribute("type");
|
|
3560
|
-
let
|
|
3560
|
+
let _;
|
|
3561
3561
|
const f = O.find((B) => B.nodeName.toLowerCase() === "mimic");
|
|
3562
|
-
f ? (
|
|
3562
|
+
f ? (_ = new fs(), _.mimicJoint = f.getAttribute("joint"), _.multiplier = parseFloat(f.getAttribute("multiplier") || 1), _.offset = parseFloat(f.getAttribute("offset") || 0)) : _ = new jo(), _.urdfNode = x, _.name = x.getAttribute("name"), _.urdfName = _.name, _.jointType = C;
|
|
3563
3563
|
let j = null, T = null, k = [0, 0, 0], H = [0, 0, 0];
|
|
3564
3564
|
O.forEach((B) => {
|
|
3565
3565
|
const ie = B.nodeName.toLowerCase();
|
|
3566
|
-
ie === "origin" ? (k = It(B.getAttribute("xyz")), H = It(B.getAttribute("rpy"))) : ie === "child" ? T = b[B.getAttribute("link")] : ie === "parent" ? j = b[B.getAttribute("link")] : ie === "limit" && (
|
|
3567
|
-
}), j.add(
|
|
3566
|
+
ie === "origin" ? (k = It(B.getAttribute("xyz")), H = It(B.getAttribute("rpy"))) : ie === "child" ? T = b[B.getAttribute("link")] : ie === "parent" ? j = b[B.getAttribute("link")] : ie === "limit" && (_.limit.lower = parseFloat(B.getAttribute("lower") || _.limit.lower), _.limit.upper = parseFloat(B.getAttribute("upper") || _.limit.upper));
|
|
3567
|
+
}), j.add(_), _.add(T), As(_, H), _.position.set(k[0], k[1], k[2]);
|
|
3568
3568
|
const F = O.filter((B) => B.nodeName.toLowerCase() === "axis")[0];
|
|
3569
3569
|
if (F) {
|
|
3570
3570
|
const B = F.getAttribute("xyz").split(/\s+/g).map((ie) => parseFloat(ie));
|
|
3571
|
-
|
|
3571
|
+
_.axis = new ce(B[0], B[1], B[2]), _.axis.normalize();
|
|
3572
3572
|
}
|
|
3573
|
-
return
|
|
3573
|
+
return _;
|
|
3574
3574
|
}
|
|
3575
|
-
function
|
|
3576
|
-
|
|
3575
|
+
function w(x, O, C, _ = null) {
|
|
3576
|
+
_ === null && (_ = new Oo());
|
|
3577
3577
|
const f = [...x.children];
|
|
3578
|
-
return
|
|
3578
|
+
return _.name = x.getAttribute("name"), _.urdfName = _.name, _.urdfNode = x, l && f.filter((T) => T.nodeName.toLowerCase() === "visual").forEach((T) => {
|
|
3579
3579
|
const k = N(T, L);
|
|
3580
|
-
if (
|
|
3580
|
+
if (_.add(k), T.hasAttribute("name")) {
|
|
3581
3581
|
const H = T.getAttribute("name");
|
|
3582
3582
|
k.name = H, k.urdfName = H, O[H] = k;
|
|
3583
3583
|
}
|
|
3584
3584
|
}), y && f.filter((T) => T.nodeName.toLowerCase() === "collision").forEach((T) => {
|
|
3585
3585
|
const k = N(T);
|
|
3586
|
-
if (
|
|
3586
|
+
if (_.add(k), T.hasAttribute("name")) {
|
|
3587
3587
|
const H = T.getAttribute("name");
|
|
3588
3588
|
k.name = H, k.urdfName = H, C[H] = k;
|
|
3589
3589
|
}
|
|
3590
|
-
}),
|
|
3590
|
+
}), _;
|
|
3591
3591
|
}
|
|
3592
3592
|
function p(x) {
|
|
3593
3593
|
const O = [...x.children], C = new $e();
|
|
3594
|
-
return C.name = x.getAttribute("name") || "", O.forEach((
|
|
3595
|
-
const f =
|
|
3594
|
+
return C.name = x.getAttribute("name") || "", O.forEach((_) => {
|
|
3595
|
+
const f = _.nodeName.toLowerCase();
|
|
3596
3596
|
if (f === "color") {
|
|
3597
|
-
const j =
|
|
3597
|
+
const j = _.getAttribute("rgba").split(/\s/g).map((T) => parseFloat(T));
|
|
3598
3598
|
C.color.setRGB(j[0], j[1], j[2]), C.opacity = j[3], C.transparent = j[3] < 1, C.depthWrite = !C.transparent;
|
|
3599
3599
|
} else if (f === "texture") {
|
|
3600
|
-
const j =
|
|
3600
|
+
const j = _.getAttribute("filename");
|
|
3601
3601
|
if (j) {
|
|
3602
3602
|
const T = new $n(u), k = D(j);
|
|
3603
3603
|
C.map = T.load(k), C.map.colorSpace = Oe;
|
|
@@ -3606,16 +3606,16 @@ class Ei {
|
|
|
3606
3606
|
}), C;
|
|
3607
3607
|
}
|
|
3608
3608
|
function N(x, O = {}) {
|
|
3609
|
-
const C = x.nodeName.toLowerCase() === "collision",
|
|
3609
|
+
const C = x.nodeName.toLowerCase() === "collision", _ = [...x.children];
|
|
3610
3610
|
let f = null;
|
|
3611
|
-
const j =
|
|
3611
|
+
const j = _.filter((k) => k.nodeName.toLowerCase() === "material")[0];
|
|
3612
3612
|
if (j) {
|
|
3613
3613
|
const k = j.getAttribute("name");
|
|
3614
3614
|
k && k in O ? f = O[k] : f = p(j);
|
|
3615
3615
|
} else
|
|
3616
3616
|
f = new $e();
|
|
3617
3617
|
const T = C ? new Io() : new Uo();
|
|
3618
|
-
return T.urdfNode = x,
|
|
3618
|
+
return T.urdfNode = x, _.forEach((k) => {
|
|
3619
3619
|
const H = k.nodeName.toLowerCase();
|
|
3620
3620
|
if (H === "geometry") {
|
|
3621
3621
|
const F = k.children[0].nodeName.toLowerCase();
|
|
@@ -3675,17 +3675,17 @@ function Ni(E, n, a, r, c) {
|
|
|
3675
3675
|
throw console.error("addModelFromUrl失败:", A), A;
|
|
3676
3676
|
}
|
|
3677
3677
|
}, y = (S) => new Promise((A, R) => {
|
|
3678
|
-
const
|
|
3679
|
-
|
|
3678
|
+
const w = new FileReader();
|
|
3679
|
+
w.onload = (p) => {
|
|
3680
3680
|
try {
|
|
3681
3681
|
const N = p.target.result, O = new Nn().parse(N);
|
|
3682
3682
|
O.preload(), A(O);
|
|
3683
3683
|
} catch (N) {
|
|
3684
3684
|
R(N);
|
|
3685
3685
|
}
|
|
3686
|
-
},
|
|
3686
|
+
}, w.onerror = () => {
|
|
3687
3687
|
R(new Error("MTL文件读取失败"));
|
|
3688
|
-
},
|
|
3688
|
+
}, w.readAsText(S);
|
|
3689
3689
|
}), u = async (S) => {
|
|
3690
3690
|
const A = {
|
|
3691
3691
|
materials: {},
|
|
@@ -3697,8 +3697,8 @@ function Ni(E, n, a, r, c) {
|
|
|
3697
3697
|
},
|
|
3698
3698
|
getAsArray: function() {
|
|
3699
3699
|
const R = [];
|
|
3700
|
-
for (const
|
|
3701
|
-
R.push(this.materials[
|
|
3700
|
+
for (const w in this.materials)
|
|
3701
|
+
R.push(this.materials[w]);
|
|
3702
3702
|
return R;
|
|
3703
3703
|
},
|
|
3704
3704
|
preload: function() {
|
|
@@ -3707,11 +3707,11 @@ function Ni(E, n, a, r, c) {
|
|
|
3707
3707
|
}
|
|
3708
3708
|
};
|
|
3709
3709
|
for (const R of S) {
|
|
3710
|
-
const
|
|
3711
|
-
Object.assign(A.materials,
|
|
3710
|
+
const w = await y(R);
|
|
3711
|
+
Object.assign(A.materials, w.materials);
|
|
3712
3712
|
}
|
|
3713
3713
|
return A.preload(), A;
|
|
3714
|
-
}, b = async (S, A = []) => new Promise((R,
|
|
3714
|
+
}, b = async (S, A = []) => new Promise((R, w) => {
|
|
3715
3715
|
const p = new FileReader();
|
|
3716
3716
|
p.onload = async (N) => {
|
|
3717
3717
|
try {
|
|
@@ -3720,18 +3720,18 @@ function Ni(E, n, a, r, c) {
|
|
|
3720
3720
|
A && A.length > 0 && (A.length === 1 ? O = await y(A[0]) : O = await u(A));
|
|
3721
3721
|
const C = new En();
|
|
3722
3722
|
O && C.setMaterials(O);
|
|
3723
|
-
const
|
|
3724
|
-
O ||
|
|
3723
|
+
const _ = C.parse(x);
|
|
3724
|
+
O || _.traverse((f) => {
|
|
3725
3725
|
f.isMesh && (f.material = new $e({
|
|
3726
3726
|
color: 8947848,
|
|
3727
3727
|
side: Tt
|
|
3728
3728
|
}));
|
|
3729
|
-
}), R(
|
|
3729
|
+
}), R(_);
|
|
3730
3730
|
} catch (x) {
|
|
3731
|
-
|
|
3731
|
+
w(x);
|
|
3732
3732
|
}
|
|
3733
3733
|
}, p.onerror = () => {
|
|
3734
|
-
|
|
3734
|
+
w(new Error("OBJ文件读取失败"));
|
|
3735
3735
|
}, p.readAsText(S);
|
|
3736
3736
|
}), g = async (S) => {
|
|
3737
3737
|
var A;
|
|
@@ -3741,27 +3741,27 @@ function Ni(E, n, a, r, c) {
|
|
|
3741
3741
|
if (!R)
|
|
3742
3742
|
throw new Error("Scene not initialized");
|
|
3743
3743
|
c();
|
|
3744
|
-
const
|
|
3744
|
+
const w = [];
|
|
3745
3745
|
for (let p = 0; p < S.length; p++) {
|
|
3746
3746
|
const N = S[p];
|
|
3747
3747
|
r.value = `正在加载模型 ${p + 1}/${S.length}...`;
|
|
3748
3748
|
const x = await l(N.objUrl), O = ((A = N.objUrl) == null ? void 0 : A.split("/").pop()) || `model_${p}.obj`, C = new File([x], O, { type: x.type });
|
|
3749
|
-
let
|
|
3749
|
+
let _ = [];
|
|
3750
3750
|
if (N.mtlUrls) {
|
|
3751
3751
|
const j = Array.isArray(N.mtlUrls) ? N.mtlUrls : [N.mtlUrls];
|
|
3752
3752
|
for (let T = 0; T < j.length; T++) {
|
|
3753
3753
|
const k = j[T], H = await l(k), F = (k == null ? void 0 : k.split("/").pop()) || `material_${p}_${T}.mtl`, B = new File([H], F, { type: H.type });
|
|
3754
|
-
|
|
3754
|
+
_.push(B);
|
|
3755
3755
|
}
|
|
3756
3756
|
}
|
|
3757
|
-
const f = await b(C,
|
|
3758
|
-
R.add(f), n.value.push(f),
|
|
3757
|
+
const f = await b(C, _);
|
|
3758
|
+
R.add(f), n.value.push(f), w.push(f);
|
|
3759
3759
|
}
|
|
3760
|
-
return a.value = !1,
|
|
3760
|
+
return a.value = !1, w;
|
|
3761
3761
|
} catch (R) {
|
|
3762
3762
|
throw console.error("加载模型失败:", R), a.value = !1, R;
|
|
3763
3763
|
}
|
|
3764
|
-
}, L = async (S, A, R = [],
|
|
3764
|
+
}, L = async (S, A, R = [], w = []) => {
|
|
3765
3765
|
let p;
|
|
3766
3766
|
const N = S.toLowerCase();
|
|
3767
3767
|
switch (N) {
|
|
@@ -3805,15 +3805,15 @@ function Ni(E, n, a, r, c) {
|
|
|
3805
3805
|
}
|
|
3806
3806
|
break;
|
|
3807
3807
|
case ".stl":
|
|
3808
|
-
const O = await A.arrayBuffer(),
|
|
3808
|
+
const O = await A.arrayBuffer(), _ = new dn().parse(O), f = new $e({
|
|
3809
3809
|
color: "#B3B3D4",
|
|
3810
3810
|
side: Tt
|
|
3811
3811
|
});
|
|
3812
|
-
p = new Ze(
|
|
3812
|
+
p = new Ze(_, f);
|
|
3813
3813
|
break;
|
|
3814
3814
|
case ".urdf":
|
|
3815
3815
|
const j = await A.text(), T = new Ei(), k = /* @__PURE__ */ new Map();
|
|
3816
|
-
|
|
3816
|
+
w.forEach((he) => {
|
|
3817
3817
|
k.set(he.name, he.blob);
|
|
3818
3818
|
}), T.loadMeshCb = async (he, m, d, I, $) => {
|
|
3819
3819
|
const G = he.split("/").pop(), de = k.get(G);
|
|
@@ -3824,8 +3824,8 @@ function Ni(E, n, a, r, c) {
|
|
|
3824
3824
|
const M = G.split(".").pop().toLowerCase();
|
|
3825
3825
|
switch (M) {
|
|
3826
3826
|
case "stl":
|
|
3827
|
-
const ae = await de.arrayBuffer(), K = new dn(m).parse(ae),
|
|
3828
|
-
d(
|
|
3827
|
+
const ae = await de.arrayBuffer(), K = new dn(m).parse(ae), Z = new Ze(K, new $e());
|
|
3828
|
+
d(Z);
|
|
3829
3829
|
break;
|
|
3830
3830
|
case "obj":
|
|
3831
3831
|
const V = await de.text(), J = new En(m), ge = G.replace(".obj", ".mtl"), be = k.get(ge);
|
|
@@ -3890,10 +3890,10 @@ function Ni(E, n, a, r, c) {
|
|
|
3890
3890
|
const { scene: A } = E();
|
|
3891
3891
|
if (!A)
|
|
3892
3892
|
throw new Error("Scene not initialized");
|
|
3893
|
-
c(), await new Promise((
|
|
3893
|
+
c(), await new Promise((w) => setTimeout(w, 100));
|
|
3894
3894
|
const R = [];
|
|
3895
|
-
for (let
|
|
3896
|
-
const p = S[
|
|
3895
|
+
for (let w = 0; w < S.length; w++) {
|
|
3896
|
+
const p = S[w], N = await L(
|
|
3897
3897
|
p.suffix,
|
|
3898
3898
|
p.blob,
|
|
3899
3899
|
p.mtlBlobs || [],
|
|
@@ -3950,8 +3950,8 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
3950
3950
|
fitCameraToAllModels: S,
|
|
3951
3951
|
getThreeJSObjects: A,
|
|
3952
3952
|
clearAllModels: R,
|
|
3953
|
-
cleanup:
|
|
3954
|
-
} = bi(a), { isAnimating: p, toggleAnimation: N, stopAnimation: x } = yi(A, u), { isClipping: O, activeClippingAxis: C, toggleClipping:
|
|
3953
|
+
cleanup: w
|
|
3954
|
+
} = bi(a), { isAnimating: p, toggleAnimation: N, stopAnimation: x } = yi(A, u), { isClipping: O, activeClippingAxis: C, toggleClipping: _, updateClippingPlanes: f } = wi(
|
|
3955
3955
|
A,
|
|
3956
3956
|
u
|
|
3957
3957
|
), { addModelsFromUrls: j, loadModelByDefaultPath: T } = Ni(
|
|
@@ -3966,9 +3966,9 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
3966
3966
|
const { camera: m, controls: d } = A();
|
|
3967
3967
|
if (!m || !d) return;
|
|
3968
3968
|
d.enabled = !0;
|
|
3969
|
-
const I = (
|
|
3970
|
-
const
|
|
3971
|
-
m.position.lerpVectors($, b.value,
|
|
3969
|
+
const I = (W) => W < 0.5 ? 4 * W * W * W : 1 - Math.pow(-2 * W + 2, 3) / 2, $ = m.position.clone(), G = d.target.clone(), de = 1500, M = Date.now(), ae = () => {
|
|
3970
|
+
const W = Date.now() - M, K = Math.min(W / de, 1), Z = I(K);
|
|
3971
|
+
m.position.lerpVectors($, b.value, Z), d.target.lerpVectors(G, g.value, Z), K < 1 ? requestAnimationFrame(ae) : y.value = !1;
|
|
3972
3972
|
};
|
|
3973
3973
|
ae();
|
|
3974
3974
|
}, H = () => {
|
|
@@ -3991,7 +3991,7 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
3991
3991
|
});
|
|
3992
3992
|
}, B = async (m, d) => {
|
|
3993
3993
|
try {
|
|
3994
|
-
p.value && x(), O.value &&
|
|
3994
|
+
p.value && x(), O.value && _();
|
|
3995
3995
|
const I = await d(m);
|
|
3996
3996
|
return S(), I;
|
|
3997
3997
|
} catch (I) {
|
|
@@ -4001,7 +4001,7 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
4001
4001
|
return gn(async () => {
|
|
4002
4002
|
await Qt(), L(), window.addEventListener("resize", D), document.addEventListener("fullscreenchange", F);
|
|
4003
4003
|
}), go(() => {
|
|
4004
|
-
window.removeEventListener("resize", D), document.removeEventListener("fullscreenchange", F), p.value && x(),
|
|
4004
|
+
window.removeEventListener("resize", D), document.removeEventListener("fullscreenchange", F), p.value && x(), w();
|
|
4005
4005
|
}), n({
|
|
4006
4006
|
addModelsFromUrls: ie,
|
|
4007
4007
|
loadModelByDefaultPath: he
|
|
@@ -4067,7 +4067,7 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
4067
4067
|
])))
|
|
4068
4068
|
], 10, Si),
|
|
4069
4069
|
Y("button", {
|
|
4070
|
-
onClick: d[1] || (d[1] = (...I) => U(
|
|
4070
|
+
onClick: d[1] || (d[1] = (...I) => U(_) && U(_)(...I)),
|
|
4071
4071
|
class: en(["control-btn", "clipping-btn", { active: U(O) }]),
|
|
4072
4072
|
disabled: r.value || U(u).length === 0,
|
|
4073
4073
|
title: "剖面视图"
|
|
@@ -4242,9 +4242,9 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
4242
4242
|
Ho(tt), me(!0);
|
|
4243
4243
|
const y = wn();
|
|
4244
4244
|
me(!0);
|
|
4245
|
-
const { itemData: u, isEdit: b, isRefreshCurStructure: g, curStructureCompIds: L } = et(l), D = qn(tt), { activeMenuPath: S, menus: A, importLoading: R } = et(y), { selectIndex:
|
|
4245
|
+
const { itemData: u, isEdit: b, isRefreshCurStructure: g, curStructureCompIds: L } = et(l), D = qn(tt), { activeMenuPath: S, menus: A, importLoading: R } = et(y), { selectIndex: w, selectTitle: p } = et(D);
|
|
4246
4246
|
return me([]), me(!1), (N, x) => {
|
|
4247
|
-
const O = Pe("el-aside"), C = Pe("el-button"),
|
|
4247
|
+
const O = Pe("el-aside"), C = Pe("el-button"), _ = Pe("el-avatar"), f = Pe("el-header"), j = Pe("router-view"), T = Pe("el-main"), k = Pe("el-container"), H = Ts("loading");
|
|
4248
4248
|
return Bt((le(), Ie(k, { "element-loading-text": "正在加载页面数据..." }, {
|
|
4249
4249
|
default: fe(() => [
|
|
4250
4250
|
U(b) === "view" ? (le(), Ie(O, {
|
|
@@ -4315,7 +4315,7 @@ const Mi = { class: "obj-viewer-container" }, Pi = { class: "floating-controls"
|
|
|
4315
4315
|
Y("div", oa, [
|
|
4316
4316
|
Yt(N.$slots, "default", {}, void 0, !0)
|
|
4317
4317
|
]),
|
|
4318
|
-
oe(
|
|
4318
|
+
oe(_, {
|
|
4319
4319
|
size: 35,
|
|
4320
4320
|
src: (F = U(r)) == null ? void 0 : F.avatarUrl
|
|
4321
4321
|
}, {
|
|
@@ -4491,12 +4491,12 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4491
4491
|
}
|
|
4492
4492
|
},
|
|
4493
4493
|
setup(E) {
|
|
4494
|
-
const n = qn(tt), a = me(0), r = me(!1), { selectTitle: c } = et(n), l = me(!1), y = Go(tt), { tableShowThree: u } = et(y), b = js(), { loginUserInfo: g } = et(b), L = yn(tt), { isEdit: D } = et(L), S = wn(tt), A = Yo(tt), { objUrl: R, blobUrls:
|
|
4494
|
+
const n = qn(tt), a = me(0), r = me(!1), { selectTitle: c } = et(n), l = me(!1), y = Go(tt), { tableShowThree: u } = et(y), b = js(), { loginUserInfo: g } = et(b), L = yn(tt), { isEdit: D } = et(L), S = wn(tt), A = Yo(tt), { objUrl: R, blobUrls: w } = et(A), p = me(null), N = me(!0), { importLoading: x, activeMenuPath: O, platName: C } = et(S), _ = me(!1);
|
|
4495
4495
|
it(() => O.value, async (m) => {
|
|
4496
|
-
m && (
|
|
4496
|
+
m && (_.value = !0);
|
|
4497
4497
|
}, { immediate: !0 });
|
|
4498
4498
|
const f = async (m) => {
|
|
4499
|
-
var $, G, de, M, ae,
|
|
4499
|
+
var $, G, de, M, ae, W, K;
|
|
4500
4500
|
const d = ($ = m == null ? void 0 : m.split("/")) == null ? void 0 : $[0], I = await qo({
|
|
4501
4501
|
key: {
|
|
4502
4502
|
type: "mainEquip",
|
|
@@ -4504,7 +4504,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4504
4504
|
pageKey: d
|
|
4505
4505
|
}
|
|
4506
4506
|
});
|
|
4507
|
-
return ((G = I == null ? void 0 : I.data) == null ? void 0 : G.type) === "success" ? ((K = (
|
|
4507
|
+
return ((G = I == null ? void 0 : I.data) == null ? void 0 : G.type) === "success" ? ((K = (W = (ae = (M = (de = I == null ? void 0 : I.data) == null ? void 0 : de.result) == null ? void 0 : M[0]) == null ? void 0 : ae.value) == null ? void 0 : W.tableData) == null ? void 0 : K.隐藏三维显示) !== !0 : !0;
|
|
4508
4508
|
};
|
|
4509
4509
|
it(
|
|
4510
4510
|
() => We.value,
|
|
@@ -4527,14 +4527,15 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4527
4527
|
},
|
|
4528
4528
|
{ immediate: !0, deep: !0 }
|
|
4529
4529
|
), it(
|
|
4530
|
-
() =>
|
|
4530
|
+
() => w == null ? void 0 : w.value,
|
|
4531
4531
|
async () => {
|
|
4532
4532
|
var m, d, I, $;
|
|
4533
|
-
if (
|
|
4533
|
+
if (w != null && w.value && ((m = w == null ? void 0 : w.value) == null ? void 0 : m.length) > 0 && !((d = We.value) != null && d.find((G) => (G == null ? void 0 : G.name) === "输入") && ((I = We.value) != null && I.find((G) => (G == null ? void 0 : G.name) === "输出")))) {
|
|
4534
|
+
console.log(232, w == null ? void 0 : w.value);
|
|
4534
4535
|
let G = [];
|
|
4535
|
-
const de = await (($ = Nt(
|
|
4536
|
-
var
|
|
4537
|
-
let ae,
|
|
4536
|
+
const de = await (($ = Nt(w == null ? void 0 : w.value)) == null ? void 0 : $.map(async (M) => {
|
|
4537
|
+
var Z, V, J, ge, be, ue, Fe, ze, Xe, _t, vt, ht, pt, kt, Ne;
|
|
4538
|
+
let ae, W, K = (Z = M == null ? void 0 : M.blob) == null ? void 0 : Z.split(",");
|
|
4538
4539
|
if ((K == null ? void 0 : K.length) > 1) {
|
|
4539
4540
|
let nt = await (K == null ? void 0 : K.map(async (Me) => {
|
|
4540
4541
|
var pe, Pt, Lt, Te, ft, xt;
|
|
@@ -4584,7 +4585,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4584
4585
|
}));
|
|
4585
4586
|
await Promise.all(Me);
|
|
4586
4587
|
}
|
|
4587
|
-
|
|
4588
|
+
W = {
|
|
4588
4589
|
suffix: "." + ((Xe = (ue = M == null ? void 0 : M.blob) == null ? void 0 : ue.split(".")) == null ? void 0 : Xe[((ze = (Fe = M == null ? void 0 : M.blob) == null ? void 0 : Fe.split(".")) == null ? void 0 : ze.length) - 1]),
|
|
4589
4590
|
blob: new Blob([ae.data], {
|
|
4590
4591
|
type: "application/octet-stream;charset=UTF-8"
|
|
@@ -4613,7 +4614,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4613
4614
|
}));
|
|
4614
4615
|
await Promise.all(Me);
|
|
4615
4616
|
}
|
|
4616
|
-
|
|
4617
|
+
W = {
|
|
4617
4618
|
suffix: "." + ((Ne = (ht = M == null ? void 0 : M.blob) == null ? void 0 : ht.split(".")) == null ? void 0 : Ne[((kt = (pt = M == null ? void 0 : M.blob) == null ? void 0 : pt.split(".")) == null ? void 0 : kt.length) - 1]),
|
|
4618
4619
|
blob: new Blob([ae.data], {
|
|
4619
4620
|
type: "application/octet-stream;charset=UTF-8"
|
|
@@ -4621,7 +4622,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4621
4622
|
mtlBlobs: nt
|
|
4622
4623
|
};
|
|
4623
4624
|
}
|
|
4624
|
-
|
|
4625
|
+
console.log(2321, W), W && G.push(W);
|
|
4625
4626
|
}));
|
|
4626
4627
|
await Promise.all(de), p.value.loadModelByDefaultPath(G);
|
|
4627
4628
|
}
|
|
@@ -4633,7 +4634,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4633
4634
|
var d, I, $, G;
|
|
4634
4635
|
if (u.value !== "" && u.value) {
|
|
4635
4636
|
let de = (d = O.value) == null ? void 0 : d.split("/"), M = de[(de == null ? void 0 : de.length) - 2];
|
|
4636
|
-
const
|
|
4637
|
+
const W = (((I = De == null ? void 0 : De.find((J) => (J == null ? void 0 : J.key) === M)) == null ? void 0 : I.download) ?? "") + "/" + u.value, K = sessionStorage.getItem("magicToken") === "" ? "123456" : sessionStorage.getItem("magicToken"), Z = await ot.post(W, null, {
|
|
4637
4638
|
responseType: "blob",
|
|
4638
4639
|
// 必须设置
|
|
4639
4640
|
headers: {
|
|
@@ -4642,7 +4643,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4642
4643
|
"Content-Type": "application/json"
|
|
4643
4644
|
}
|
|
4644
4645
|
});
|
|
4645
|
-
var m = new Blob([
|
|
4646
|
+
var m = new Blob([Z.data], {
|
|
4646
4647
|
type: "application/octet-stream;charset=UTF-8"
|
|
4647
4648
|
});
|
|
4648
4649
|
const V = [
|
|
@@ -4658,10 +4659,10 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4658
4659
|
{ deep: !0, immediate: !0 }
|
|
4659
4660
|
);
|
|
4660
4661
|
const j = async () => {
|
|
4661
|
-
var ae,
|
|
4662
|
+
var ae, W, K, Z, V, J, ge, be, ue, Fe, ze, Xe, _t, vt, ht, pt, kt;
|
|
4662
4663
|
r.value = !0;
|
|
4663
4664
|
let m = (ae = O.value) == null ? void 0 : ae.split("/"), d = m[(m == null ? void 0 : m.length) - 2];
|
|
4664
|
-
const I = ((
|
|
4665
|
+
const I = ((W = De == null ? void 0 : De.find((Ne) => (Ne == null ? void 0 : Ne.key) === d)) == null ? void 0 : W.value) ?? "";
|
|
4665
4666
|
let $ = "";
|
|
4666
4667
|
const G = await ot.post("http://139.196.154.85:20024/api/sysAuth/login", {
|
|
4667
4668
|
account: "superadmin",
|
|
@@ -4669,7 +4670,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4669
4670
|
codeId: 0,
|
|
4670
4671
|
code: ""
|
|
4671
4672
|
});
|
|
4672
|
-
((K = G == null ? void 0 : G.data) == null ? void 0 : K.code) === 200 && ($ = `Bearer ${(V = (
|
|
4673
|
+
((K = G == null ? void 0 : G.data) == null ? void 0 : K.code) === 200 && ($ = `Bearer ${(V = (Z = G.data) == null ? void 0 : Z.result) == null ? void 0 : V.accessToken}`, sessionStorage.setItem("magicToken", $));
|
|
4673
4674
|
const de = $ === "" ? "123456" : $, M = await ot.post(I, null, {
|
|
4674
4675
|
headers: {
|
|
4675
4676
|
Authorization: de,
|
|
@@ -4783,7 +4784,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4783
4784
|
F.value ? (d.style.width = "18.75rem", m.style.width = "calc(100% - 24rem)") : m.style.width = "400px";
|
|
4784
4785
|
};
|
|
4785
4786
|
return (m, d) => {
|
|
4786
|
-
const I = Pe("el-button"), $ = Pe("el-avatar"), G = Pe("el-header"), de = Pe("el-container"), M = Pe("el-icon"), ae = Pe("el-input"),
|
|
4787
|
+
const I = Pe("el-button"), $ = Pe("el-avatar"), G = Pe("el-header"), de = Pe("el-container"), M = Pe("el-icon"), ae = Pe("el-input"), W = Pe("el-aside"), K = Pe("el-collapse-item"), Z = Pe("el-collapse"), V = Pe("el-main"), J = Pe("router-view"), ge = Ts("loading");
|
|
4787
4788
|
return U(D) === "edit" ? (le(), Ie(de, {
|
|
4788
4789
|
key: 0,
|
|
4789
4790
|
class: "client-container"
|
|
@@ -4948,7 +4949,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4948
4949
|
class: "client-main"
|
|
4949
4950
|
}, {
|
|
4950
4951
|
default: fe(() => [
|
|
4951
|
-
oe(
|
|
4952
|
+
oe(Z, {
|
|
4952
4953
|
modelValue: k.value,
|
|
4953
4954
|
"onUpdate:modelValue": d[3] || (d[3] = (be) => k.value = be),
|
|
4954
4955
|
accordion: "",
|
|
@@ -4965,7 +4966,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4965
4966
|
}, null, 8, ["name"])
|
|
4966
4967
|
]),
|
|
4967
4968
|
default: fe(() => [
|
|
4968
|
-
oe(
|
|
4969
|
+
oe(W, { style: { width: "100%" } }, {
|
|
4969
4970
|
default: fe(() => [
|
|
4970
4971
|
oe(Ln, { mode: "vertical" })
|
|
4971
4972
|
]),
|
|
@@ -4979,13 +4980,13 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
4979
4980
|
}, 8, ["modelValue"]),
|
|
4980
4981
|
Y("div", Pa, [
|
|
4981
4982
|
oe(Ki, {
|
|
4982
|
-
isShow:
|
|
4983
|
+
isShow: _.value,
|
|
4983
4984
|
windowConfig: E.windowConfig,
|
|
4984
4985
|
ref_key: "threeModelRef",
|
|
4985
4986
|
ref: p
|
|
4986
4987
|
}, null, 8, ["isShow", "windowConfig"])
|
|
4987
4988
|
]),
|
|
4988
|
-
oe(
|
|
4989
|
+
oe(Z, {
|
|
4989
4990
|
modelValue: H.value,
|
|
4990
4991
|
"onUpdate:modelValue": d[5] || (d[5] = (be) => H.value = be),
|
|
4991
4992
|
accordion: "",
|
|
@@ -5053,7 +5054,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5053
5054
|
}, {
|
|
5054
5055
|
default: fe(() => [
|
|
5055
5056
|
Y("div", Ra, [
|
|
5056
|
-
oe(
|
|
5057
|
+
oe(W, { width: "300px" }, {
|
|
5057
5058
|
default: fe(() => [
|
|
5058
5059
|
oe(Ln, { mode: "vertical" })
|
|
5059
5060
|
]),
|
|
@@ -5079,7 +5080,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5079
5080
|
]);
|
|
5080
5081
|
};
|
|
5081
5082
|
}
|
|
5082
|
-
}), Fa = /* @__PURE__ */ Mt(Da, [["__scopeId", "data-v-
|
|
5083
|
+
}), Fa = /* @__PURE__ */ Mt(Da, [["__scopeId", "data-v-fcc3a8de"]]), ja = { class: "system-wrap" }, Oa = {
|
|
5083
5084
|
__name: "index",
|
|
5084
5085
|
props: {
|
|
5085
5086
|
windowConfig: {
|
|
@@ -5163,7 +5164,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5163
5164
|
},
|
|
5164
5165
|
emits: ["change", "contentChange"],
|
|
5165
5166
|
setup(E, { emit: n }) {
|
|
5166
|
-
const a = E, r = n, c = me([]), l = me([]), y = me([]), u = me(0), b = yn(tt), g = wn(tt), { itemData: L, originalData: D } = et(b), { activeMenuPath: S, platform: A } = et(g), R = me(null),
|
|
5167
|
+
const a = E, r = n, c = me([]), l = me([]), y = me([]), u = me(0), b = yn(tt), g = wn(tt), { itemData: L, originalData: D } = et(b), { activeMenuPath: S, platform: A } = et(g), R = me(null), w = me(0), p = me([]);
|
|
5167
5168
|
me("");
|
|
5168
5169
|
const N = me(0), x = (f) => {
|
|
5169
5170
|
r("contentChange", f);
|
|
@@ -5189,7 +5190,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5189
5190
|
);
|
|
5190
5191
|
const C = () => {
|
|
5191
5192
|
R.value.click();
|
|
5192
|
-
},
|
|
5193
|
+
}, _ = async (f) => {
|
|
5193
5194
|
const j = f.target.files;
|
|
5194
5195
|
if (!j) return;
|
|
5195
5196
|
new FileReader(), c.value = [], l.value = [], N.value = j.length;
|
|
@@ -5197,7 +5198,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5197
5198
|
const F = new FileReader();
|
|
5198
5199
|
F.onload = (B) => {
|
|
5199
5200
|
try {
|
|
5200
|
-
l.value.push(B.target.result),
|
|
5201
|
+
l.value.push(B.target.result), w.value++;
|
|
5201
5202
|
} catch (ie) {
|
|
5202
5203
|
console.error("解析失败:", ie);
|
|
5203
5204
|
return;
|
|
@@ -5213,7 +5214,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5213
5214
|
},
|
|
5214
5215
|
{ deep: !0, immediate: !0 }
|
|
5215
5216
|
), it(
|
|
5216
|
-
() =>
|
|
5217
|
+
() => w.value,
|
|
5217
5218
|
() => {
|
|
5218
5219
|
var f;
|
|
5219
5220
|
((f = p.value) == null ? void 0 : f.length) !== 0 && (b.setOriginalData(p.value), b.setItemData(p.value));
|
|
@@ -5258,7 +5259,7 @@ const ba = /* @__PURE__ */ Mt(Ko, [["render", ga], ["__scopeId", "data-v-e003bdb
|
|
|
5258
5259
|
ref_key: "fileInput",
|
|
5259
5260
|
ref: R,
|
|
5260
5261
|
accept: ".txt, .inm",
|
|
5261
|
-
onChange:
|
|
5262
|
+
onChange: _,
|
|
5262
5263
|
style: { display: "none" },
|
|
5263
5264
|
multiple: ""
|
|
5264
5265
|
}, null, 544),
|