ss-component-new 1.2.77 → 1.2.78
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/{MTLLoader-BruI0iCV.js → MTLLoader-BDMG6YfL.js} +5 -5
- package/dist/{MTLLoader-Bseg1sor.cjs → MTLLoader-CnPy8SIM.cjs} +1 -1
- package/dist/{OrbitControls-Bxqvo8Mr.js → OrbitControls-CY4nXrtT.js} +1 -1
- package/dist/{OrbitControls-BiNnC97N.cjs → OrbitControls-CuLYwxjN.cjs} +1 -1
- package/dist/{URDFLoader-DWo3pDBH.js → URDFLoader-B-_NDbTy.js} +174 -174
- package/dist/{URDFLoader-DexIn4xU.cjs → URDFLoader-CMLpHJvm.cjs} +1 -1
- package/dist/{animationData-BVpXOZwe.cjs → animationData-CU7hS77W.cjs} +1 -1
- package/dist/{animationData-BDkjPdQf.js → animationData-x63hYcF2.js} +18 -18
- package/dist/{array-6LpFOZ5o.cjs → array-CuFsDmBp.cjs} +1 -1
- package/dist/{array-D5Rc5rM9.js → array-DGGaDihY.js} +27 -27
- package/dist/{iconfont-Bnhc7fLw.cjs → iconfont-DapI438c.cjs} +1 -1
- package/dist/{iconfont-14del5d2.js → iconfont-Dh5vye0Q.js} +27 -27
- package/dist/{index-D_coIVx9.cjs → index-B5IQ7gb8.cjs} +1 -1
- package/dist/{index-BMwOfyZG.js → index-B5J3L2e2.js} +2 -2
- package/dist/{index-Da8kLXUi.js → index-B5SNHDlg.js} +1 -1
- package/dist/{index-CiluLmLS.js → index-B6afWPV2.js} +11 -11
- package/dist/{index-Cc_IAZBO.js → index-BHWTQgQr.js} +4 -4
- package/dist/{index-CjipjSmP.cjs → index-BHfg6eX1.cjs} +1 -1
- package/dist/{index-BXCI98KY.js → index-BNw0thEl.js} +6 -6
- package/dist/{index-Bq27i8N6.js → index-BQVxgmhe.js} +4 -4
- package/dist/{index-C5AMx3DP.js → index-BRjEFy0A.js} +2 -2
- package/dist/{index-Pg_Ez4Na.cjs → index-BVm32wTk.cjs} +1 -1
- package/dist/{index-BPWX1kmE.cjs → index-B_8I59kW.cjs} +1 -1
- package/dist/{index-Ai5OAXHo.js → index-BgE_6FYY.js} +6 -6
- package/dist/{index-jKLdvV3y.js → index-BhSs5oWU.js} +20 -20
- package/dist/{index-CV0wJjuo.cjs → index-Bk-2miD0.cjs} +1 -1
- package/dist/{index-D9iPLSwS.js → index-Bmtw8a5p.js} +2 -2
- package/dist/index-Bo1rw4RK.js +12694 -0
- package/dist/{index-DNp4E_lQ.cjs → index-BoRc53Op.cjs} +1 -1
- package/dist/{index-BP1mTaAy.js → index-BpdTJyQA.js} +4 -4
- package/dist/{index-Cv58m2R8.js → index-BuNPE4NQ.js} +1 -1
- package/dist/{index-Do4pZeLF.cjs → index-ByfRHlqN.cjs} +1 -1
- package/dist/{index-BjDn0YhH.cjs → index-CB5nu_Oy.cjs} +1 -1
- package/dist/{index-BCGURMXa.js → index-CCofb6hR.js} +2 -2
- package/dist/{index-sCZuOhEC.js → index-CD_POzdO.js} +1 -1
- package/dist/{index-BU__qorE.cjs → index-CG6XNbRF.cjs} +1 -1
- package/dist/index-CHM2ty3v.cjs +1 -0
- package/dist/{index-BOttcNaR.js → index-CLz_5ZZr.js} +2 -2
- package/dist/{index-C3DC8sX2.js → index-CMI2loKt.js} +9 -9
- package/dist/{index-DRbQJezd.cjs → index-CPIcSR8X.cjs} +1 -1
- package/dist/{index-CTfB2BO7.cjs → index-CRAmNrm9.cjs} +1 -1
- package/dist/{index-B3jUJ0ml.js → index-CRSa1xvW.js} +7 -7
- package/dist/{index-BXumaiVx.js → index-CWlvSpb2.js} +2 -2
- package/dist/{index-CwvAshmz.js → index-CWny47Cz.js} +3 -3
- package/dist/{index-CT1bDBZy.js → index-C_vmgWYF.js} +5 -5
- package/dist/{index-iqnKq5qd.js → index-CdWi5i0R.js} +1 -1
- package/dist/{index-cGnhqEuy.cjs → index-CeLtly50.cjs} +1 -1
- package/dist/{index-1uzZjqSR.cjs → index-CiGUPby0.cjs} +1 -1
- package/dist/{index-CEuxxYEp.cjs → index-CrtAijF6.cjs} +1 -1
- package/dist/{index-CS2SJFa5.cjs → index-Cu_c71UK.cjs} +1 -1
- package/dist/{index-DZboVCcU.cjs → index-CuboYYZp.cjs} +1 -1
- package/dist/{index-CBIrHmhA.cjs → index-D59u4uun.cjs} +1 -1
- package/dist/{index-aG7MmrtC.js → index-DLhzF-SN.js} +3 -3
- package/dist/{index-PkJYBcS-.js → index-DOW-WHBS.js} +25 -22
- package/dist/{index-CZkjboM8.js → index-DPtclCKc.js} +6 -6
- package/dist/{index-BWjhL8R0.js → index-D_qR3hDI.js} +1 -1
- package/dist/{index-DndAdSGT.js → index-DqxXG1QQ.js} +3 -3
- package/dist/{index-CNDlskJD.cjs → index-N59Ddt9i.cjs} +1 -1
- package/dist/{index-nzQPJif1.cjs → index-NwVeUXHo.cjs} +1 -1
- package/dist/{index-lkxTc6vy.js → index-RGPE_-6J.js} +6 -6
- package/dist/{index-DEyzKyXf.cjs → index-_295fBTp.cjs} +1 -1
- package/dist/{index-BYc9jyiE.js → index-bfMyItzl.js} +3 -3
- package/dist/{index-B3x0Un8L.js → index-c_dxTNA1.js} +3 -3
- package/dist/{index-BJizDAnh.cjs → index-id7MTN5D.cjs} +1 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-CnNB3KR5.cjs +37 -0
- package/dist/{index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Ctqs6jS6.js → index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-Dd4fwgC2.js} +14195 -14528
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Bqxa7GJA.js → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Jb-pxYCE.js} +14268 -14110
- package/dist/{index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-D6FKmWHb.cjs → index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-pgm7LZ2p.cjs} +352 -352
- package/dist/index.vue_vue_type_style_index_0_scoped_140f5e74_lang-RIZ8CIk5.cjs +1 -0
- package/dist/index.vue_vue_type_style_index_0_scoped_140f5e74_lang-t-qpDVld.js +377 -0
- package/dist/{index.vue_vue_type_style_index_1_lang-DQ90IC2k.cjs → index.vue_vue_type_style_index_1_lang-BJyabOtw.cjs} +1 -1
- package/dist/{index.vue_vue_type_style_index_1_lang-CrcbIeWl.js → index.vue_vue_type_style_index_1_lang-CNsmX3gg.js} +37 -37
- package/dist/{isString-8mN8gX27.js → isString-Bb0EYAKj.js} +1 -1
- package/dist/{main-D3WREi0-.cjs → main-DIQ7mQ8a.cjs} +1 -1
- package/dist/{main-BkI9SlJQ.js → main-wl0-ex-A.js} +5 -5
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.js +11 -11
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +12 -12
- package/dist/{threeModel-CVlu8rK_.js → threeModel-C0oPO7tY.js} +5 -5
- package/dist/{threeModel-Bp11Ni6H.cjs → threeModel-Tv_tZqCA.cjs} +1 -1
- package/dist/{threePreview-Dw4LR6jh.cjs → threePreview-BaI2wC-D.cjs} +1 -1
- package/dist/{threePreview-CdzNCx3-.js → threePreview-D5UPnEBN.js} +4 -4
- package/dist/{threeSceneView-jhQi8rSG.js → threeSceneView-CInjoNVf.js} +134 -134
- package/dist/{threeSceneView-BdVTjYBI.cjs → threeSceneView-DVmaCW7K.cjs} +1 -1
- package/dist/{threeSceneViewForCPMPIP-DgAoijFZ.js → threeSceneViewForCPMPIP-C8CXMOuk.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-DRYioXDE.cjs → threeSceneViewForCPMPIP-DohzLUui.cjs} +1 -1
- package/dist/{threeTrackPathView-Ds9FmHU1.cjs → threeTrackPathView-B3rKlzro.cjs} +1 -1
- package/dist/{threeTrackPathView-C1HVNI2F.js → threeTrackPathView-CVpyIv5S.js} +48 -48
- package/dist/{threeViewerHost-DvIwe0xo.js → threeViewerHost-BgQmCw2g.js} +15 -15
- package/dist/{threeViewerHost-Cazxmy9Q.cjs → threeViewerHost-DqCoBmb3.cjs} +1 -1
- package/dist/{urdfTree-CMKhj8xM.js → urdfTree-BmNTo-xk.js} +1 -1
- package/dist/{urdfTree-dHyqQi6d.cjs → urdfTree-CShYg3Vd.cjs} +1 -1
- package/dist/{workpieceTreePanel-4MfitYyo.cjs → workpieceTreePanel-BXdDwos2.cjs} +1 -1
- package/dist/{workpieceTreePanel-BM7lPJRO.js → workpieceTreePanel-GI4Y-wNL.js} +29 -29
- package/package.json +1 -1
- package/dist/index-C-Cn4YSI.js +0 -12234
- package/dist/index-qqyeENwY.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_0b6f1a18_lang-wPtij0q7.cjs +0 -37
- package/dist/index.vue_vue_type_style_index_0_scoped_140f5e74_lang-Ddv_4Qcm.cjs +0 -1
- package/dist/index.vue_vue_type_style_index_0_scoped_140f5e74_lang-DmUFTzw3.js +0 -376
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Ln } from "./MTLLoader-
|
|
2
|
-
import {
|
|
1
|
+
import { S as Ln } from "./MTLLoader-BDMG6YfL.js";
|
|
2
|
+
import { bZ as vn, bh as Rn, aT as lt, b5 as At, aU as In, W as pe, ah as he, br as dt, Y as Mn, be as Tt, Z as ut, ai as Le, by as ft, b_ as Sn, ad as ve, bH as Se, a2 as me, b7 as Gn, ae as On, b1 as qn, _ as ht, bw as Pn, a9 as Un, b9 as jn, ac as Fn, aa as Hn, aG as pt, bb as Et, bE as mt, bG as Bn, aJ as zn, aV as ye, bz as Dn, a$ as bt, bt as Vn, a8 as Ce, aL as Jn, bu as Wn, bx as Kn, bn as Ge, bp as gt, b$ as Yn, c0 as Xn, c1 as yt, c2 as $n, c3 as Zn, c4 as Qn, c5 as ei, aZ as ti, c6 as ni, c7 as ii, ag as si } from "./index.vue_vue_type_style_index_0_scoped_0f027c8c_lang-Jb-pxYCE.js";
|
|
3
3
|
class wt extends vn {
|
|
4
4
|
/**
|
|
5
5
|
* Constructs a new TGA loader.
|
|
@@ -44,11 +44,11 @@ class wt extends vn {
|
|
|
44
44
|
if (u.pixel_size !== 8 && u.pixel_size !== 16 && u.pixel_size !== 24 && u.pixel_size !== 32)
|
|
45
45
|
throw new Error("THREE.TGALoader: Invalid pixel size " + u.pixel_size);
|
|
46
46
|
}
|
|
47
|
-
function R(u,
|
|
48
|
-
let
|
|
49
|
-
const _ =
|
|
50
|
-
if (
|
|
51
|
-
|
|
47
|
+
function R(u, K, D, B, X) {
|
|
48
|
+
let j, z;
|
|
49
|
+
const _ = D.pixel_size >> 3, x = D.width * D.height * _;
|
|
50
|
+
if (K && (z = X.subarray(B, B += D.colormap_length * (D.colormap_size >> 3))), u) {
|
|
51
|
+
j = new Uint8Array(x);
|
|
52
52
|
let N, f, A, V = 0;
|
|
53
53
|
const le = new Uint8Array(_);
|
|
54
54
|
for (; V < x; )
|
|
@@ -56,96 +56,96 @@ class wt extends vn {
|
|
|
56
56
|
for (A = 0; A < _; ++A)
|
|
57
57
|
le[A] = X[B++];
|
|
58
58
|
for (A = 0; A < f; ++A)
|
|
59
|
-
|
|
59
|
+
j.set(le, V + A * _);
|
|
60
60
|
V += _ * f;
|
|
61
61
|
} else {
|
|
62
62
|
for (f *= _, A = 0; A < f; ++A)
|
|
63
|
-
|
|
63
|
+
j[V + A] = X[B++];
|
|
64
64
|
V += f;
|
|
65
65
|
}
|
|
66
66
|
} else
|
|
67
|
-
|
|
67
|
+
j = X.subarray(
|
|
68
68
|
B,
|
|
69
|
-
B +=
|
|
69
|
+
B += K ? D.width * D.height : x
|
|
70
70
|
);
|
|
71
71
|
return {
|
|
72
|
-
pixel_data:
|
|
73
|
-
palettes:
|
|
72
|
+
pixel_data: j,
|
|
73
|
+
palettes: z
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
function se(u,
|
|
76
|
+
function se(u, K, D, B, X, j, z, _, x) {
|
|
77
77
|
const N = x;
|
|
78
78
|
let f, A = 0, V, le;
|
|
79
79
|
const Ae = C.width;
|
|
80
|
-
for (le =
|
|
81
|
-
for (V = X; V !==
|
|
80
|
+
for (le = K; le !== B; le += D)
|
|
81
|
+
for (V = X; V !== z; V += j, A++)
|
|
82
82
|
f = _[A], u[(V + Ae * le) * 4 + 3] = 255, u[(V + Ae * le) * 4 + 2] = N[f * 3 + 0], u[(V + Ae * le) * 4 + 1] = N[f * 3 + 1], u[(V + Ae * le) * 4 + 0] = N[f * 3 + 2];
|
|
83
83
|
return u;
|
|
84
84
|
}
|
|
85
|
-
function v(u,
|
|
85
|
+
function v(u, K, D, B, X, j, z, _) {
|
|
86
86
|
let x, N = 0, f, A;
|
|
87
87
|
const V = C.width;
|
|
88
|
-
for (A =
|
|
89
|
-
for (f = X; f !==
|
|
88
|
+
for (A = K; A !== B; A += D)
|
|
89
|
+
for (f = X; f !== z; f += j, N += 2)
|
|
90
90
|
x = _[N + 0] + (_[N + 1] << 8), u[(f + V * A) * 4 + 0] = (x & 31744) >> 7, u[(f + V * A) * 4 + 1] = (x & 992) >> 2, u[(f + V * A) * 4 + 2] = (x & 31) << 3, u[(f + V * A) * 4 + 3] = x & 32768 ? 0 : 255;
|
|
91
91
|
return u;
|
|
92
92
|
}
|
|
93
|
-
function oe(u,
|
|
93
|
+
function oe(u, K, D, B, X, j, z, _) {
|
|
94
94
|
let x = 0, N, f;
|
|
95
95
|
const A = C.width;
|
|
96
|
-
for (f =
|
|
97
|
-
for (N = X; N !==
|
|
96
|
+
for (f = K; f !== B; f += D)
|
|
97
|
+
for (N = X; N !== z; N += j, x += 3)
|
|
98
98
|
u[(N + A * f) * 4 + 3] = 255, u[(N + A * f) * 4 + 2] = _[x + 0], u[(N + A * f) * 4 + 1] = _[x + 1], u[(N + A * f) * 4 + 0] = _[x + 2];
|
|
99
99
|
return u;
|
|
100
100
|
}
|
|
101
|
-
function I(u,
|
|
101
|
+
function I(u, K, D, B, X, j, z, _) {
|
|
102
102
|
let x = 0, N, f;
|
|
103
103
|
const A = C.width;
|
|
104
|
-
for (f =
|
|
105
|
-
for (N = X; N !==
|
|
104
|
+
for (f = K; f !== B; f += D)
|
|
105
|
+
for (N = X; N !== z; N += j, x += 4)
|
|
106
106
|
u[(N + A * f) * 4 + 2] = _[x + 0], u[(N + A * f) * 4 + 1] = _[x + 1], u[(N + A * f) * 4 + 0] = _[x + 2], u[(N + A * f) * 4 + 3] = _[x + 3];
|
|
107
107
|
return u;
|
|
108
108
|
}
|
|
109
|
-
function Y(u,
|
|
109
|
+
function Y(u, K, D, B, X, j, z, _) {
|
|
110
110
|
let x, N = 0, f, A;
|
|
111
111
|
const V = C.width;
|
|
112
|
-
for (A =
|
|
113
|
-
for (f = X; f !==
|
|
112
|
+
for (A = K; A !== B; A += D)
|
|
113
|
+
for (f = X; f !== z; f += j, N++)
|
|
114
114
|
x = _[N], u[(f + V * A) * 4 + 0] = x, u[(f + V * A) * 4 + 1] = x, u[(f + V * A) * 4 + 2] = x, u[(f + V * A) * 4 + 3] = 255;
|
|
115
115
|
return u;
|
|
116
116
|
}
|
|
117
|
-
function ne(u,
|
|
117
|
+
function ne(u, K, D, B, X, j, z, _) {
|
|
118
118
|
let x = 0, N, f;
|
|
119
119
|
const A = C.width;
|
|
120
|
-
for (f =
|
|
121
|
-
for (N = X; N !==
|
|
120
|
+
for (f = K; f !== B; f += D)
|
|
121
|
+
for (N = X; N !== z; N += j, x += 2)
|
|
122
122
|
u[(N + A * f) * 4 + 0] = _[x + 0], u[(N + A * f) * 4 + 1] = _[x + 0], u[(N + A * f) * 4 + 2] = _[x + 0], u[(N + A * f) * 4 + 3] = _[x + 1];
|
|
123
123
|
return u;
|
|
124
124
|
}
|
|
125
|
-
function we(u,
|
|
126
|
-
let
|
|
127
|
-
switch ((C.flags & M) >>
|
|
125
|
+
function we(u, K, D, B, X) {
|
|
126
|
+
let j, z, _, x, N, f;
|
|
127
|
+
switch ((C.flags & M) >> P) {
|
|
128
128
|
default:
|
|
129
129
|
case J:
|
|
130
|
-
|
|
130
|
+
j = 0, _ = 1, N = K, z = 0, x = 1, f = D;
|
|
131
131
|
break;
|
|
132
|
-
case
|
|
133
|
-
|
|
132
|
+
case F:
|
|
133
|
+
j = 0, _ = 1, N = K, z = D - 1, x = -1, f = -1;
|
|
134
134
|
break;
|
|
135
135
|
case S:
|
|
136
|
-
|
|
136
|
+
j = K - 1, _ = -1, N = -1, z = 0, x = 1, f = D;
|
|
137
137
|
break;
|
|
138
138
|
case E:
|
|
139
|
-
|
|
139
|
+
j = K - 1, _ = -1, N = -1, z = D - 1, x = -1, f = -1;
|
|
140
140
|
break;
|
|
141
141
|
}
|
|
142
|
-
if (
|
|
142
|
+
if (U)
|
|
143
143
|
switch (C.pixel_size) {
|
|
144
144
|
case 8:
|
|
145
|
-
Y(u,
|
|
145
|
+
Y(u, z, x, f, j, _, N, B);
|
|
146
146
|
break;
|
|
147
147
|
case 16:
|
|
148
|
-
ne(u,
|
|
148
|
+
ne(u, z, x, f, j, _, N, B);
|
|
149
149
|
break;
|
|
150
150
|
default:
|
|
151
151
|
throw new Error("THREE.TGALoader: Format not supported.");
|
|
@@ -153,23 +153,23 @@ class wt extends vn {
|
|
|
153
153
|
else
|
|
154
154
|
switch (C.pixel_size) {
|
|
155
155
|
case 8:
|
|
156
|
-
se(u,
|
|
156
|
+
se(u, z, x, f, j, _, N, B, X);
|
|
157
157
|
break;
|
|
158
158
|
case 16:
|
|
159
|
-
v(u,
|
|
159
|
+
v(u, z, x, f, j, _, N, B);
|
|
160
160
|
break;
|
|
161
161
|
case 24:
|
|
162
|
-
oe(u,
|
|
162
|
+
oe(u, z, x, f, j, _, N, B);
|
|
163
163
|
break;
|
|
164
164
|
case 32:
|
|
165
|
-
I(u,
|
|
165
|
+
I(u, z, x, f, j, _, N, B);
|
|
166
166
|
break;
|
|
167
167
|
default:
|
|
168
168
|
throw new Error("THREE.TGALoader: Format not supported.");
|
|
169
169
|
}
|
|
170
170
|
return u;
|
|
171
171
|
}
|
|
172
|
-
const ke = 0, Ne = 1, $ = 2, ie = 3, ee = 9, be = 10, ge = 11, M = 48,
|
|
172
|
+
const ke = 0, Ne = 1, $ = 2, ie = 3, ee = 9, be = 10, ge = 11, M = 48, P = 4, F = 0, E = 1, J = 2, S = 3;
|
|
173
173
|
if (G.length < 19) throw new Error("THREE.TGALoader: Not enough data to contain header.");
|
|
174
174
|
let m = 0;
|
|
175
175
|
const h = new Uint8Array(G), C = {
|
|
@@ -191,7 +191,7 @@ class wt extends vn {
|
|
|
191
191
|
if (Q(C), C.id_length + m > G.length)
|
|
192
192
|
throw new Error("THREE.TGALoader: No data.");
|
|
193
193
|
m += C.id_length;
|
|
194
|
-
let L = !1, k = !1,
|
|
194
|
+
let L = !1, k = !1, U = !1;
|
|
195
195
|
switch (C.image_type) {
|
|
196
196
|
case ee:
|
|
197
197
|
L = !0, k = !0;
|
|
@@ -205,10 +205,10 @@ class wt extends vn {
|
|
|
205
205
|
case $:
|
|
206
206
|
break;
|
|
207
207
|
case ge:
|
|
208
|
-
L = !0,
|
|
208
|
+
L = !0, U = !0;
|
|
209
209
|
break;
|
|
210
210
|
case ie:
|
|
211
|
-
|
|
211
|
+
U = !0;
|
|
212
212
|
break;
|
|
213
213
|
}
|
|
214
214
|
const ae = new Uint8Array(C.width * C.height * 4), te = R(L, k, C, m, h);
|
|
@@ -381,7 +381,7 @@ class oi extends lt {
|
|
|
381
381
|
}
|
|
382
382
|
return e.id = s, e.sid = o, e.arraySyntax = r, e.memberSyntax = d, e.sampler = I(t.getAttribute("source")), e;
|
|
383
383
|
}
|
|
384
|
-
function
|
|
384
|
+
function P(t) {
|
|
385
385
|
const e = [], i = t.channels, n = t.samplers, s = t.sources;
|
|
386
386
|
for (const o in i)
|
|
387
387
|
if (i.hasOwnProperty(o)) {
|
|
@@ -390,8 +390,8 @@ class oi extends lt {
|
|
|
390
390
|
}
|
|
391
391
|
return e;
|
|
392
392
|
}
|
|
393
|
-
function
|
|
394
|
-
return ee(T.animations[t],
|
|
393
|
+
function F(t) {
|
|
394
|
+
return ee(T.animations[t], P);
|
|
395
395
|
}
|
|
396
396
|
function E(t, e, i) {
|
|
397
397
|
const n = T.nodes[t.id], s = Ee(n.id), o = n.transforms[t.sid], r = n.matrix.clone().transpose();
|
|
@@ -401,8 +401,8 @@ class oi extends lt {
|
|
|
401
401
|
case "matrix":
|
|
402
402
|
for (l = 0, g = e.array.length; l < g; l++)
|
|
403
403
|
if (d = e.array[l], c = l * i.stride, p[d] === void 0 && (p[d] = {}), t.arraySyntax === !0) {
|
|
404
|
-
const
|
|
405
|
-
p[d][H] =
|
|
404
|
+
const W = i.array[c], H = t.indices[0] + 4 * t.indices[1];
|
|
405
|
+
p[d][H] = W;
|
|
406
406
|
} else
|
|
407
407
|
for (a = 0, b = i.stride; a < b; a++)
|
|
408
408
|
p[d][a] = i.array[c + a];
|
|
@@ -459,7 +459,7 @@ class oi extends lt {
|
|
|
459
459
|
for (let s = 0, o = t.length; s < o; s++) {
|
|
460
460
|
const r = t[s];
|
|
461
461
|
if (r.value[e] === null) {
|
|
462
|
-
if (i =
|
|
462
|
+
if (i = U(t, s, e), n = ae(t, s, e), i === null) {
|
|
463
463
|
r.value[e] = n.value[e];
|
|
464
464
|
continue;
|
|
465
465
|
}
|
|
@@ -471,7 +471,7 @@ class oi extends lt {
|
|
|
471
471
|
}
|
|
472
472
|
}
|
|
473
473
|
}
|
|
474
|
-
function
|
|
474
|
+
function U(t, e, i) {
|
|
475
475
|
for (; e >= 0; ) {
|
|
476
476
|
const n = t[e];
|
|
477
477
|
if (n.value[i] !== null) return n;
|
|
@@ -512,17 +512,17 @@ class oi extends lt {
|
|
|
512
512
|
}
|
|
513
513
|
T.clips[t.getAttribute("id")] = e;
|
|
514
514
|
}
|
|
515
|
-
function
|
|
515
|
+
function K(t) {
|
|
516
516
|
const e = [], i = t.name, n = t.end - t.start || -1, s = t.animations;
|
|
517
517
|
for (let o = 0, r = s.length; o < r; o++) {
|
|
518
|
-
const d =
|
|
518
|
+
const d = F(s[o]);
|
|
519
519
|
for (let c = 0, l = d.length; c < l; c++)
|
|
520
520
|
e.push(d[c]);
|
|
521
521
|
}
|
|
522
522
|
return new ft(i, n, e);
|
|
523
523
|
}
|
|
524
|
-
function
|
|
525
|
-
return ee(T.clips[t],
|
|
524
|
+
function D(t) {
|
|
525
|
+
return ee(T.clips[t], K);
|
|
526
526
|
}
|
|
527
527
|
function B(t) {
|
|
528
528
|
const e = {};
|
|
@@ -556,16 +556,16 @@ class oi extends lt {
|
|
|
556
556
|
e.sources[o] = Oe(s);
|
|
557
557
|
break;
|
|
558
558
|
case "joints":
|
|
559
|
-
e.joints =
|
|
559
|
+
e.joints = j(s);
|
|
560
560
|
break;
|
|
561
561
|
case "vertex_weights":
|
|
562
|
-
e.vertexWeights =
|
|
562
|
+
e.vertexWeights = z(s);
|
|
563
563
|
break;
|
|
564
564
|
}
|
|
565
565
|
}
|
|
566
566
|
return e;
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function j(t) {
|
|
569
569
|
const e = {
|
|
570
570
|
inputs: {}
|
|
571
571
|
};
|
|
@@ -581,7 +581,7 @@ class oi extends lt {
|
|
|
581
581
|
}
|
|
582
582
|
return e;
|
|
583
583
|
}
|
|
584
|
-
function
|
|
584
|
+
function z(t) {
|
|
585
585
|
const e = {
|
|
586
586
|
inputs: {}
|
|
587
587
|
};
|
|
@@ -629,7 +629,7 @@ class oi extends lt {
|
|
|
629
629
|
const q = r[b + d], fe = r[b + c], re = a[fe];
|
|
630
630
|
O.push({ index: q, weight: re }), b += 2;
|
|
631
631
|
}
|
|
632
|
-
for (O.sort(
|
|
632
|
+
for (O.sort(W), w = 0; w < 4; w++) {
|
|
633
633
|
const q = O[w];
|
|
634
634
|
q !== void 0 ? (i.indices.array.push(q.index), i.weights.array.push(q.weight)) : (i.indices.array.push(0), i.weights.array.push(0));
|
|
635
635
|
}
|
|
@@ -639,7 +639,7 @@ class oi extends lt {
|
|
|
639
639
|
i.joints.push({ name: H, boneInverse: O });
|
|
640
640
|
}
|
|
641
641
|
return i;
|
|
642
|
-
function
|
|
642
|
+
function W(H, O) {
|
|
643
643
|
return O.weight - H.weight;
|
|
644
644
|
}
|
|
645
645
|
}
|
|
@@ -767,19 +767,19 @@ class oi extends lt {
|
|
|
767
767
|
case "ambient":
|
|
768
768
|
case "shininess":
|
|
769
769
|
case "transparency":
|
|
770
|
-
e[s.nodeName] =
|
|
770
|
+
e[s.nodeName] = Fe(s);
|
|
771
771
|
break;
|
|
772
772
|
case "transparent":
|
|
773
773
|
e[s.nodeName] = {
|
|
774
774
|
opaque: s.hasAttribute("opaque") ? s.getAttribute("opaque") : "A_ONE",
|
|
775
|
-
data:
|
|
775
|
+
data: Fe(s)
|
|
776
776
|
};
|
|
777
777
|
break;
|
|
778
778
|
}
|
|
779
779
|
}
|
|
780
780
|
return e;
|
|
781
781
|
}
|
|
782
|
-
function
|
|
782
|
+
function Fe(t) {
|
|
783
783
|
const e = {};
|
|
784
784
|
for (let i = 0, n = t.childNodes.length; i < n; i++) {
|
|
785
785
|
const s = t.childNodes[i];
|
|
@@ -840,7 +840,7 @@ class oi extends lt {
|
|
|
840
840
|
s.textContent.toUpperCase() === "TRUE" ? e.technique[s.nodeName] = 1 : s.textContent.toUpperCase() === "FALSE" ? e.technique[s.nodeName] = 0 : e.technique[s.nodeName] = parseInt(s.textContent);
|
|
841
841
|
break;
|
|
842
842
|
case "bump":
|
|
843
|
-
e[s.nodeName] =
|
|
843
|
+
e[s.nodeName] = ze(s);
|
|
844
844
|
break;
|
|
845
845
|
}
|
|
846
846
|
}
|
|
@@ -868,13 +868,13 @@ class oi extends lt {
|
|
|
868
868
|
e[s.nodeName] = parseInt(s.textContent);
|
|
869
869
|
break;
|
|
870
870
|
case "bump":
|
|
871
|
-
e[s.nodeName] =
|
|
871
|
+
e[s.nodeName] = ze(s);
|
|
872
872
|
break;
|
|
873
873
|
}
|
|
874
874
|
}
|
|
875
875
|
return e;
|
|
876
876
|
}
|
|
877
|
-
function
|
|
877
|
+
function ze(t) {
|
|
878
878
|
const e = {};
|
|
879
879
|
for (let i = 0, n = t.childNodes.length; i < n; i++) {
|
|
880
880
|
const s = t.childNodes[i];
|
|
@@ -887,11 +887,11 @@ class oi extends lt {
|
|
|
887
887
|
}
|
|
888
888
|
return e;
|
|
889
889
|
}
|
|
890
|
-
function
|
|
890
|
+
function De(t) {
|
|
891
891
|
return t;
|
|
892
892
|
}
|
|
893
893
|
function St(t) {
|
|
894
|
-
return ee(T.effects[t],
|
|
894
|
+
return ee(T.effects[t], De);
|
|
895
895
|
}
|
|
896
896
|
function Gt(t) {
|
|
897
897
|
const e = {
|
|
@@ -912,7 +912,7 @@ class oi extends lt {
|
|
|
912
912
|
let e, i = t.slice((t.lastIndexOf(".") - 1 >>> 0) + 2);
|
|
913
913
|
switch (i = i.toLowerCase(), i) {
|
|
914
914
|
case "tga":
|
|
915
|
-
e =
|
|
915
|
+
e = Ue;
|
|
916
916
|
break;
|
|
917
917
|
default:
|
|
918
918
|
e = rt;
|
|
@@ -1033,7 +1033,7 @@ class oi extends lt {
|
|
|
1033
1033
|
function qt(t) {
|
|
1034
1034
|
return ee(T.materials[t], Ve);
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function Pt(t) {
|
|
1037
1037
|
const e = {
|
|
1038
1038
|
name: t.getAttribute("name")
|
|
1039
1039
|
};
|
|
@@ -1042,36 +1042,36 @@ class oi extends lt {
|
|
|
1042
1042
|
if (s.nodeType === 1)
|
|
1043
1043
|
switch (s.nodeName) {
|
|
1044
1044
|
case "optics":
|
|
1045
|
-
e.optics =
|
|
1045
|
+
e.optics = Ut(s);
|
|
1046
1046
|
break;
|
|
1047
1047
|
}
|
|
1048
1048
|
}
|
|
1049
1049
|
T.cameras[t.getAttribute("id")] = e;
|
|
1050
1050
|
}
|
|
1051
|
-
function
|
|
1051
|
+
function Ut(t) {
|
|
1052
1052
|
for (let e = 0; e < t.childNodes.length; e++) {
|
|
1053
1053
|
const i = t.childNodes[e];
|
|
1054
1054
|
switch (i.nodeName) {
|
|
1055
1055
|
case "technique_common":
|
|
1056
|
-
return
|
|
1056
|
+
return jt(i);
|
|
1057
1057
|
}
|
|
1058
1058
|
}
|
|
1059
1059
|
return {};
|
|
1060
1060
|
}
|
|
1061
|
-
function
|
|
1061
|
+
function jt(t) {
|
|
1062
1062
|
const e = {};
|
|
1063
1063
|
for (let i = 0; i < t.childNodes.length; i++) {
|
|
1064
1064
|
const n = t.childNodes[i];
|
|
1065
1065
|
switch (n.nodeName) {
|
|
1066
1066
|
case "perspective":
|
|
1067
1067
|
case "orthographic":
|
|
1068
|
-
e.technique = n.nodeName, e.parameters =
|
|
1068
|
+
e.technique = n.nodeName, e.parameters = Ft(n);
|
|
1069
1069
|
break;
|
|
1070
1070
|
}
|
|
1071
1071
|
}
|
|
1072
1072
|
return e;
|
|
1073
1073
|
}
|
|
1074
|
-
function
|
|
1074
|
+
function Ft(t) {
|
|
1075
1075
|
const e = {};
|
|
1076
1076
|
for (let i = 0; i < t.childNodes.length; i++) {
|
|
1077
1077
|
const n = t.childNodes[i];
|
|
@@ -1103,7 +1103,7 @@ class oi extends lt {
|
|
|
1103
1103
|
case "orthographic":
|
|
1104
1104
|
let i = t.optics.parameters.ymag, n = t.optics.parameters.xmag;
|
|
1105
1105
|
const s = t.optics.parameters.aspect_ratio;
|
|
1106
|
-
n = n === void 0 ? i * s : n, i = i === void 0 ? n / s : i, n *= 0.5, i *= 0.5, e = new
|
|
1106
|
+
n = n === void 0 ? i * s : n, i = i === void 0 ? n / s : i, n *= 0.5, i *= 0.5, e = new Pn(
|
|
1107
1107
|
-n,
|
|
1108
1108
|
n,
|
|
1109
1109
|
i,
|
|
@@ -1130,13 +1130,13 @@ class oi extends lt {
|
|
|
1130
1130
|
if (s.nodeType === 1)
|
|
1131
1131
|
switch (s.nodeName) {
|
|
1132
1132
|
case "technique_common":
|
|
1133
|
-
e =
|
|
1133
|
+
e = zt(s);
|
|
1134
1134
|
break;
|
|
1135
1135
|
}
|
|
1136
1136
|
}
|
|
1137
1137
|
T.lights[t.getAttribute("id")] = e;
|
|
1138
1138
|
}
|
|
1139
|
-
function
|
|
1139
|
+
function zt(t) {
|
|
1140
1140
|
const e = {};
|
|
1141
1141
|
for (let i = 0, n = t.childNodes.length; i < n; i++) {
|
|
1142
1142
|
const s = t.childNodes[i];
|
|
@@ -1146,12 +1146,12 @@ class oi extends lt {
|
|
|
1146
1146
|
case "point":
|
|
1147
1147
|
case "spot":
|
|
1148
1148
|
case "ambient":
|
|
1149
|
-
e.technique = s.nodeName, e.parameters =
|
|
1149
|
+
e.technique = s.nodeName, e.parameters = Dt(s);
|
|
1150
1150
|
}
|
|
1151
1151
|
}
|
|
1152
1152
|
return e;
|
|
1153
1153
|
}
|
|
1154
|
-
function
|
|
1154
|
+
function Dt(t) {
|
|
1155
1155
|
const e = {};
|
|
1156
1156
|
for (let i = 0, n = t.childNodes.length; i < n; i++) {
|
|
1157
1157
|
const s = t.childNodes[i];
|
|
@@ -1172,27 +1172,27 @@ class oi extends lt {
|
|
|
1172
1172
|
}
|
|
1173
1173
|
return e;
|
|
1174
1174
|
}
|
|
1175
|
-
function
|
|
1175
|
+
function We(t) {
|
|
1176
1176
|
let e;
|
|
1177
1177
|
switch (t.technique) {
|
|
1178
1178
|
case "directional":
|
|
1179
1179
|
e = new Hn();
|
|
1180
1180
|
break;
|
|
1181
1181
|
case "point":
|
|
1182
|
-
e = new
|
|
1182
|
+
e = new Fn();
|
|
1183
1183
|
break;
|
|
1184
1184
|
case "spot":
|
|
1185
|
-
e = new
|
|
1185
|
+
e = new jn();
|
|
1186
1186
|
break;
|
|
1187
1187
|
case "ambient":
|
|
1188
|
-
e = new
|
|
1188
|
+
e = new Un();
|
|
1189
1189
|
break;
|
|
1190
1190
|
}
|
|
1191
1191
|
return t.parameters.color && e.color.copy(t.parameters.color), t.parameters.distance && (e.distance = t.parameters.distance), e;
|
|
1192
1192
|
}
|
|
1193
1193
|
function Vt(t) {
|
|
1194
1194
|
const e = T.lights[t];
|
|
1195
|
-
return e !== void 0 ? ee(e,
|
|
1195
|
+
return e !== void 0 ? ee(e, We) : (console.warn("THREE.ColladaLoader: Couldn't find light with ID:", t), null);
|
|
1196
1196
|
}
|
|
1197
1197
|
function Jt(t) {
|
|
1198
1198
|
const e = {
|
|
@@ -1211,7 +1211,7 @@ class oi extends lt {
|
|
|
1211
1211
|
e.sources[o] = Oe(s);
|
|
1212
1212
|
break;
|
|
1213
1213
|
case "vertices":
|
|
1214
|
-
e.vertices =
|
|
1214
|
+
e.vertices = Wt(s);
|
|
1215
1215
|
break;
|
|
1216
1216
|
case "polygons":
|
|
1217
1217
|
console.warn("THREE.ColladaLoader: Unsupported primitive type: ", s.nodeName);
|
|
@@ -1220,7 +1220,7 @@ class oi extends lt {
|
|
|
1220
1220
|
case "linestrips":
|
|
1221
1221
|
case "polylist":
|
|
1222
1222
|
case "triangles":
|
|
1223
|
-
e.primitives.push(
|
|
1223
|
+
e.primitives.push(Kt(s));
|
|
1224
1224
|
break;
|
|
1225
1225
|
default:
|
|
1226
1226
|
console.log(s);
|
|
@@ -1252,7 +1252,7 @@ class oi extends lt {
|
|
|
1252
1252
|
}
|
|
1253
1253
|
return e;
|
|
1254
1254
|
}
|
|
1255
|
-
function
|
|
1255
|
+
function Wt(t) {
|
|
1256
1256
|
const e = {};
|
|
1257
1257
|
for (let i = 0; i < t.childNodes.length; i++) {
|
|
1258
1258
|
const n = t.childNodes[i];
|
|
@@ -1260,7 +1260,7 @@ class oi extends lt {
|
|
|
1260
1260
|
}
|
|
1261
1261
|
return e;
|
|
1262
1262
|
}
|
|
1263
|
-
function
|
|
1263
|
+
function Kt(t) {
|
|
1264
1264
|
const e = {
|
|
1265
1265
|
type: t.nodeName,
|
|
1266
1266
|
material: t.getAttribute("material"),
|
|
@@ -1301,7 +1301,7 @@ class oi extends lt {
|
|
|
1301
1301
|
t[i].hasUV === !0 && e++;
|
|
1302
1302
|
e > 0 && e < t.length && (t.uvsNeedsFix = !0);
|
|
1303
1303
|
}
|
|
1304
|
-
function
|
|
1304
|
+
function Ke(t) {
|
|
1305
1305
|
const e = {}, i = t.sources, n = t.vertices, s = t.primitives;
|
|
1306
1306
|
if (s.length === 0) return {};
|
|
1307
1307
|
const o = Yt(s);
|
|
@@ -1312,10 +1312,10 @@ class oi extends lt {
|
|
|
1312
1312
|
return e;
|
|
1313
1313
|
}
|
|
1314
1314
|
function $t(t, e, i) {
|
|
1315
|
-
const n = {}, s = { array: [], stride: 0 }, o = { array: [], stride: 0 }, r = { array: [], stride: 0 }, d = { array: [], stride: 0 }, c = { array: [], stride: 0 }, l = { array: [], stride: 4 }, g = { array: [], stride: 4 }, a = new
|
|
1315
|
+
const n = {}, s = { array: [], stride: 0 }, o = { array: [], stride: 0 }, r = { array: [], stride: 0 }, d = { array: [], stride: 0 }, c = { array: [], stride: 0 }, l = { array: [], stride: 4 }, g = { array: [], stride: 4 }, a = new zn(), b = [];
|
|
1316
1316
|
let p = 0;
|
|
1317
1317
|
for (let w = 0; w < t.length; w++) {
|
|
1318
|
-
const y = t[w],
|
|
1318
|
+
const y = t[w], W = y.inputs;
|
|
1319
1319
|
let H = 0;
|
|
1320
1320
|
switch (y.type) {
|
|
1321
1321
|
case "lines":
|
|
@@ -1345,8 +1345,8 @@ class oi extends lt {
|
|
|
1345
1345
|
console.warn("THREE.ColladaLoader: Unknown primitive type:", y.type);
|
|
1346
1346
|
}
|
|
1347
1347
|
a.addGroup(p, H, w), p += H, y.material && b.push(y.material);
|
|
1348
|
-
for (const O in
|
|
1349
|
-
const q =
|
|
1348
|
+
for (const O in W) {
|
|
1349
|
+
const q = W[O];
|
|
1350
1350
|
switch (O) {
|
|
1351
1351
|
case "VERTEX":
|
|
1352
1352
|
for (const fe in i) {
|
|
@@ -1417,13 +1417,13 @@ class oi extends lt {
|
|
|
1417
1417
|
for (let b = 0, p = d.length; b < p; b++) {
|
|
1418
1418
|
const w = d[b];
|
|
1419
1419
|
if (w === 4) {
|
|
1420
|
-
const y = a + r * 0,
|
|
1421
|
-
c(y), c(
|
|
1420
|
+
const y = a + r * 0, W = a + r * 1, H = a + r * 2, O = a + r * 3;
|
|
1421
|
+
c(y), c(W), c(O), c(W), c(H), c(O);
|
|
1422
1422
|
} else if (w === 3) {
|
|
1423
|
-
const y = a + r * 0,
|
|
1424
|
-
c(y), c(
|
|
1423
|
+
const y = a + r * 0, W = a + r * 1, H = a + r * 2;
|
|
1424
|
+
c(y), c(W), c(H);
|
|
1425
1425
|
} else if (w > 4)
|
|
1426
|
-
for (let y = 1,
|
|
1426
|
+
for (let y = 1, W = w - 2; y <= W; y++) {
|
|
1427
1427
|
const H = a + r * 0, O = a + r * y, q = a + r * (y + 1);
|
|
1428
1428
|
c(H), c(O), c(q);
|
|
1429
1429
|
}
|
|
@@ -1434,7 +1434,7 @@ class oi extends lt {
|
|
|
1434
1434
|
c(a);
|
|
1435
1435
|
}
|
|
1436
1436
|
function Ye(t) {
|
|
1437
|
-
return ee(T.geometries[t],
|
|
1437
|
+
return ee(T.geometries[t], Ke);
|
|
1438
1438
|
}
|
|
1439
1439
|
function Zt(t) {
|
|
1440
1440
|
const e = {
|
|
@@ -1699,10 +1699,10 @@ class oi extends lt {
|
|
|
1699
1699
|
else if (p.static)
|
|
1700
1700
|
console.warn("THREE.ColladaLoader: Joint " + g + " is static.");
|
|
1701
1701
|
else {
|
|
1702
|
-
const w = b.object, y = p.axis,
|
|
1702
|
+
const w = b.object, y = p.axis, W = b.transforms;
|
|
1703
1703
|
ce.identity();
|
|
1704
|
-
for (let H = 0; H <
|
|
1705
|
-
const O =
|
|
1704
|
+
for (let H = 0; H < W.length; H++) {
|
|
1705
|
+
const O = W[H];
|
|
1706
1706
|
if (O.sid && O.sid.indexOf(g) !== -1)
|
|
1707
1707
|
switch (p.type) {
|
|
1708
1708
|
case "revolute":
|
|
@@ -1898,7 +1898,7 @@ class oi extends lt {
|
|
|
1898
1898
|
const d = [], c = [];
|
|
1899
1899
|
for (s = 0; s < n.length; s++)
|
|
1900
1900
|
r = n[s], d.push(r.bone), c.push(r.boneInverse);
|
|
1901
|
-
return new
|
|
1901
|
+
return new Kn(d, c);
|
|
1902
1902
|
}
|
|
1903
1903
|
function Qe(t, e, i) {
|
|
1904
1904
|
t.traverse(function(n) {
|
|
@@ -1924,9 +1924,9 @@ class oi extends lt {
|
|
|
1924
1924
|
p !== null && e.push(p.clone());
|
|
1925
1925
|
}
|
|
1926
1926
|
for (let a = 0, b = r.length; a < b; a++) {
|
|
1927
|
-
const p = r[a], w = N(p.id), y = Ye(w.id),
|
|
1928
|
-
for (let fe = 0, re =
|
|
1929
|
-
const xe =
|
|
1927
|
+
const p = r[a], w = N(p.id), y = Ye(w.id), W = et(y, p.materials), H = p.skeletons, O = w.skin.joints, q = bn(H, O);
|
|
1928
|
+
for (let fe = 0, re = W.length; fe < re; fe++) {
|
|
1929
|
+
const xe = W[fe];
|
|
1930
1930
|
xe.isSkinnedMesh && (xe.bind(q, w.skin.bindMatrix), xe.normalizeSkinWeights()), e.push(xe);
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
@@ -1936,8 +1936,8 @@ class oi extends lt {
|
|
|
1936
1936
|
}
|
|
1937
1937
|
for (let a = 0, b = c.length; a < b; a++) {
|
|
1938
1938
|
const p = c[a], w = Ye(p.id), y = et(w, p.materials);
|
|
1939
|
-
for (let
|
|
1940
|
-
e.push(y[
|
|
1939
|
+
for (let W = 0, H = y.length; W < H; W++)
|
|
1940
|
+
e.push(y[W]);
|
|
1941
1941
|
}
|
|
1942
1942
|
for (let a = 0, b = l.length; a < b; a++)
|
|
1943
1943
|
e.push(Ee(l[a]).clone());
|
|
@@ -1945,7 +1945,7 @@ class oi extends lt {
|
|
|
1945
1945
|
if (n.length === 0 && e.length === 1)
|
|
1946
1946
|
g = e[0];
|
|
1947
1947
|
else {
|
|
1948
|
-
g = s === "JOINT" ? new
|
|
1948
|
+
g = s === "JOINT" ? new Dn() : new pt();
|
|
1949
1949
|
for (let a = 0; a < e.length; a++)
|
|
1950
1950
|
g.add(e[a]);
|
|
1951
1951
|
}
|
|
@@ -1979,7 +1979,7 @@ class oi extends lt {
|
|
|
1979
1979
|
let c;
|
|
1980
1980
|
switch (n) {
|
|
1981
1981
|
case "lines":
|
|
1982
|
-
c = new
|
|
1982
|
+
c = new Wn(s.data, d);
|
|
1983
1983
|
break;
|
|
1984
1984
|
case "linestrips":
|
|
1985
1985
|
c = new Jn(s.data, d);
|
|
@@ -2036,7 +2036,7 @@ class oi extends lt {
|
|
|
2036
2036
|
if (ne(T.animations) === !1) {
|
|
2037
2037
|
const e = [];
|
|
2038
2038
|
for (const i in T.animations) {
|
|
2039
|
-
const n =
|
|
2039
|
+
const n = F(i);
|
|
2040
2040
|
for (let s = 0, o = n.length; s < o; s++)
|
|
2041
2041
|
e.push(n[s]);
|
|
2042
2042
|
}
|
|
@@ -2044,7 +2044,7 @@ class oi extends lt {
|
|
|
2044
2044
|
}
|
|
2045
2045
|
} else
|
|
2046
2046
|
for (const e in t)
|
|
2047
|
-
Ie.push(
|
|
2047
|
+
Ie.push(D(e));
|
|
2048
2048
|
}
|
|
2049
2049
|
function En(t) {
|
|
2050
2050
|
let e = "";
|
|
@@ -2058,19 +2058,19 @@ class oi extends lt {
|
|
|
2058
2058
|
}
|
|
2059
2059
|
if (G.length === 0)
|
|
2060
2060
|
return { scene: new Mn() };
|
|
2061
|
-
const st = new DOMParser().parseFromString(G, "application/xml"), Z = R(st, "COLLADA")[0],
|
|
2062
|
-
if (
|
|
2063
|
-
const t = R(
|
|
2061
|
+
const st = new DOMParser().parseFromString(G, "application/xml"), Z = R(st, "COLLADA")[0], Pe = st.getElementsByTagName("parsererror")[0];
|
|
2062
|
+
if (Pe !== void 0) {
|
|
2063
|
+
const t = R(Pe, "div")[0];
|
|
2064
2064
|
let e;
|
|
2065
|
-
return t ? e = t.textContent : e = En(
|
|
2065
|
+
return t ? e = t.textContent : e = En(Pe), console.error(`THREE.ColladaLoader: Failed to parse collada file.
|
|
2066
2066
|
`, e), null;
|
|
2067
2067
|
}
|
|
2068
2068
|
const xn = Z.getAttribute("version");
|
|
2069
2069
|
console.debug("THREE.ColladaLoader: File version", xn);
|
|
2070
2070
|
const ot = we(R(Z, "asset")[0]), rt = new Tt(this.manager);
|
|
2071
2071
|
rt.setPath(this.resourcePath || Q).setCrossOrigin(this.crossOrigin);
|
|
2072
|
-
let
|
|
2073
|
-
wt && (
|
|
2072
|
+
let Ue;
|
|
2073
|
+
wt && (Ue = new wt(this.manager), Ue.setPath(this.resourcePath || Q));
|
|
2074
2074
|
const Re = new ut(), Ie = [];
|
|
2075
2075
|
let at = {}, _n = 0;
|
|
2076
2076
|
const T = {
|
|
@@ -2089,7 +2089,7 @@ class oi extends lt {
|
|
|
2089
2089
|
physicsModels: {},
|
|
2090
2090
|
kinematicsScenes: {}
|
|
2091
2091
|
};
|
|
2092
|
-
$(Z, "library_animations", "animation", be), $(Z, "library_animation_clips", "animation_clip", u), $(Z, "library_controllers", "controller", B), $(Z, "library_images", "image", f), $(Z, "library_effects", "effect", le), $(Z, "library_materials", "material", Gt), $(Z, "library_cameras", "camera",
|
|
2092
|
+
$(Z, "library_animations", "animation", be), $(Z, "library_animation_clips", "animation_clip", u), $(Z, "library_controllers", "controller", B), $(Z, "library_images", "image", f), $(Z, "library_effects", "effect", le), $(Z, "library_materials", "material", Gt), $(Z, "library_cameras", "camera", Pt), $(Z, "library_lights", "light", Bt), $(Z, "library_geometries", "geometry", Jt), $(Z, "library_nodes", "node", qe), $(Z, "library_visual_scenes", "visual_scene", kn), $(Z, "library_kinematics_models", "kinematics_model", Zt), $(Z, "library_physics_models", "physics_model", rn), $(Z, "scene", "instance_kinematics_scene", ln), ie(T.animations, P), ie(T.clips, K), ie(T.controllers, _), ie(T.images, A), ie(T.effects, De), ie(T.materials, Ve), ie(T.cameras, Je), ie(T.lights, We), ie(T.geometries, Ke), ie(T.visualScenes, nt), Tn(), hn();
|
|
2093
2093
|
const Me = An(R(Z, "scene")[0]);
|
|
2094
2094
|
return Me.animations = Ie, ot.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."), Me.rotation.set(-Math.PI / 2, 0, 0)), Me.scale.multiplyScalar(ot.unit), {
|
|
2095
2095
|
get animations() {
|
|
@@ -2101,12 +2101,12 @@ class oi extends lt {
|
|
|
2101
2101
|
};
|
|
2102
2102
|
}
|
|
2103
2103
|
}
|
|
2104
|
-
const
|
|
2104
|
+
const je = new Et(), kt = new si();
|
|
2105
2105
|
function _e(ue) {
|
|
2106
2106
|
return ue ? ue.trim().split(/\s+/g).map((G) => parseFloat(G)) : [0, 0, 0];
|
|
2107
2107
|
}
|
|
2108
2108
|
function Nt(ue, G, Q = !1) {
|
|
2109
|
-
Q || ue.rotation.set(0, 0, 0), kt.set(G[0], G[1], G[2], "ZYX"),
|
|
2109
|
+
Q || ue.rotation.set(0, 0, 0), kt.set(G[0], G[1], G[2], "ZYX"), je.setFromEuler(kt), je.multiply(ue.quaternion), ue.quaternion.copy(je);
|
|
2110
2110
|
}
|
|
2111
2111
|
class ci {
|
|
2112
2112
|
constructor(G) {
|
|
@@ -2138,30 +2138,30 @@ class ci {
|
|
|
2138
2138
|
function ke(M) {
|
|
2139
2139
|
if (!/^package:\/\//.test(M))
|
|
2140
2140
|
return Q ? Q + M : M;
|
|
2141
|
-
const [
|
|
2141
|
+
const [P, F] = M.replace(/^package:\/\//, "").split(/\/(.+)/);
|
|
2142
2142
|
if (typeof R == "string")
|
|
2143
|
-
return R.endsWith(
|
|
2143
|
+
return R.endsWith(P) ? R + "/" + F : R + "/" + P + "/" + F;
|
|
2144
2144
|
if (R instanceof Function)
|
|
2145
|
-
return R(
|
|
2145
|
+
return R(P) + "/" + F;
|
|
2146
2146
|
if (typeof R == "object")
|
|
2147
|
-
return
|
|
2147
|
+
return P in R ? R[P] + "/" + F : (console.error(`URDFLoader : ${P} not found in provided package list.`), null);
|
|
2148
2148
|
}
|
|
2149
2149
|
function Ne(M) {
|
|
2150
|
-
let
|
|
2151
|
-
M instanceof Document ?
|
|
2152
|
-
const
|
|
2153
|
-
return $(
|
|
2150
|
+
let P;
|
|
2151
|
+
M instanceof Document ? P = [...M.children] : M instanceof Element ? P = [M] : P = [...new DOMParser().parseFromString(M, "text/xml").children];
|
|
2152
|
+
const F = P.filter((E) => E.nodeName === "robot").pop();
|
|
2153
|
+
return $(F);
|
|
2154
2154
|
}
|
|
2155
2155
|
function $(M) {
|
|
2156
|
-
const
|
|
2156
|
+
const P = [...M.children], F = P.filter((L) => L.nodeName.toLowerCase() === "link"), E = P.filter((L) => L.nodeName.toLowerCase() === "joint"), J = P.filter((L) => L.nodeName.toLowerCase() === "material"), S = new Xn();
|
|
2157
2157
|
S.robotName = M.getAttribute("name"), S.urdfRobotNode = M, J.forEach((L) => {
|
|
2158
2158
|
const k = L.getAttribute("name");
|
|
2159
2159
|
we[k] = be(L);
|
|
2160
2160
|
});
|
|
2161
2161
|
const m = {}, h = {};
|
|
2162
|
-
|
|
2163
|
-
const k = L.getAttribute("name"),
|
|
2164
|
-
Y[k] = ee(L, m, h,
|
|
2162
|
+
F.forEach((L) => {
|
|
2163
|
+
const k = L.getAttribute("name"), U = M.querySelector(`child[link="${k}"]`) === null;
|
|
2164
|
+
Y[k] = ee(L, m, h, U ? S : null);
|
|
2165
2165
|
}), E.forEach((L) => {
|
|
2166
2166
|
const k = L.getAttribute("name");
|
|
2167
2167
|
ne[k] = ie(L);
|
|
@@ -2170,14 +2170,14 @@ class ci {
|
|
|
2170
2170
|
return C.forEach((L) => {
|
|
2171
2171
|
L instanceof yt && ne[L.mimicJoint].mimicJoints.push(L);
|
|
2172
2172
|
}), C.forEach((L) => {
|
|
2173
|
-
const k = /* @__PURE__ */ new Set(),
|
|
2173
|
+
const k = /* @__PURE__ */ new Set(), U = (ae) => {
|
|
2174
2174
|
if (k.has(ae))
|
|
2175
2175
|
throw new Error("URDFLoader: Detected an infinite loop of mimic joints.");
|
|
2176
2176
|
k.add(ae), ae.mimicJoints.forEach((te) => {
|
|
2177
|
-
|
|
2177
|
+
U(te);
|
|
2178
2178
|
});
|
|
2179
2179
|
};
|
|
2180
|
-
|
|
2180
|
+
U(L);
|
|
2181
2181
|
}), S.frames = {
|
|
2182
2182
|
...h,
|
|
2183
2183
|
...m,
|
|
@@ -2186,96 +2186,96 @@ class ci {
|
|
|
2186
2186
|
}, S;
|
|
2187
2187
|
}
|
|
2188
2188
|
function ie(M) {
|
|
2189
|
-
const
|
|
2189
|
+
const P = [...M.children], F = M.getAttribute("type");
|
|
2190
2190
|
let E;
|
|
2191
|
-
const J =
|
|
2192
|
-
J ? (E = new yt(), E.mimicJoint = J.getAttribute("joint"), E.multiplier = parseFloat(J.getAttribute("multiplier") || 1), E.offset = parseFloat(J.getAttribute("offset") || 0)) : E = new $n(), E.urdfNode = M, E.name = M.getAttribute("name"), E.urdfName = E.name, E.jointType =
|
|
2191
|
+
const J = P.find((k) => k.nodeName.toLowerCase() === "mimic");
|
|
2192
|
+
J ? (E = new yt(), E.mimicJoint = J.getAttribute("joint"), E.multiplier = parseFloat(J.getAttribute("multiplier") || 1), E.offset = parseFloat(J.getAttribute("offset") || 0)) : E = new $n(), E.urdfNode = M, E.name = M.getAttribute("name"), E.urdfName = E.name, E.jointType = F;
|
|
2193
2193
|
let S = null, m = null, h = [0, 0, 0], C = [0, 0, 0];
|
|
2194
|
-
|
|
2195
|
-
const
|
|
2196
|
-
|
|
2194
|
+
P.forEach((k) => {
|
|
2195
|
+
const U = k.nodeName.toLowerCase();
|
|
2196
|
+
U === "origin" ? (h = _e(k.getAttribute("xyz")), C = _e(k.getAttribute("rpy"))) : U === "child" ? m = Y[k.getAttribute("link")] : U === "parent" ? S = Y[k.getAttribute("link")] : U === "limit" && (E.limit.lower = parseFloat(k.getAttribute("lower") || E.limit.lower), E.limit.upper = parseFloat(k.getAttribute("upper") || E.limit.upper));
|
|
2197
2197
|
}), S.add(E), E.add(m), Nt(E, C), E.position.set(h[0], h[1], h[2]);
|
|
2198
|
-
const L =
|
|
2198
|
+
const L = P.filter((k) => k.nodeName.toLowerCase() === "axis")[0];
|
|
2199
2199
|
if (L) {
|
|
2200
|
-
const k = L.getAttribute("xyz").split(/\s+/g).map((
|
|
2200
|
+
const k = L.getAttribute("xyz").split(/\s+/g).map((U) => parseFloat(U));
|
|
2201
2201
|
E.axis = new pe(k[0], k[1], k[2]), E.axis.normalize();
|
|
2202
2202
|
}
|
|
2203
2203
|
return E;
|
|
2204
2204
|
}
|
|
2205
|
-
function ee(M,
|
|
2205
|
+
function ee(M, P, F, E = null) {
|
|
2206
2206
|
E === null && (E = new Zn());
|
|
2207
2207
|
const J = [...M.children];
|
|
2208
2208
|
return E.name = M.getAttribute("name"), E.urdfName = E.name, E.urdfNode = M, v && J.filter((m) => m.nodeName.toLowerCase() === "visual").forEach((m) => {
|
|
2209
2209
|
const h = ge(m, we);
|
|
2210
2210
|
if (E.add(h), m.hasAttribute("name")) {
|
|
2211
2211
|
const C = m.getAttribute("name");
|
|
2212
|
-
h.name = C, h.urdfName = C,
|
|
2212
|
+
h.name = C, h.urdfName = C, P[C] = h;
|
|
2213
2213
|
}
|
|
2214
2214
|
}), oe && J.filter((m) => m.nodeName.toLowerCase() === "collision").forEach((m) => {
|
|
2215
2215
|
const h = ge(m);
|
|
2216
2216
|
if (E.add(h), m.hasAttribute("name")) {
|
|
2217
2217
|
const C = m.getAttribute("name");
|
|
2218
|
-
h.name = C, h.urdfName = C,
|
|
2218
|
+
h.name = C, h.urdfName = C, F[C] = h;
|
|
2219
2219
|
}
|
|
2220
2220
|
}), E;
|
|
2221
2221
|
}
|
|
2222
2222
|
function be(M) {
|
|
2223
|
-
const
|
|
2224
|
-
return
|
|
2223
|
+
const P = [...M.children], F = new ve();
|
|
2224
|
+
return F.name = M.getAttribute("name") || "", P.forEach((E) => {
|
|
2225
2225
|
const J = E.nodeName.toLowerCase();
|
|
2226
2226
|
if (J === "color") {
|
|
2227
2227
|
const S = E.getAttribute("rgba").split(/\s/g).map((m) => parseFloat(m));
|
|
2228
|
-
|
|
2228
|
+
F.color.setRGB(S[0], S[1], S[2]), F.opacity = S[3], F.transparent = S[3] < 1, F.depthWrite = !F.transparent;
|
|
2229
2229
|
} else if (J === "texture") {
|
|
2230
2230
|
const S = E.getAttribute("filename");
|
|
2231
2231
|
if (S) {
|
|
2232
2232
|
const m = new Tt(I), h = ke(S);
|
|
2233
|
-
|
|
2233
|
+
F.map = m.load(h), F.map.colorSpace = me;
|
|
2234
2234
|
}
|
|
2235
2235
|
}
|
|
2236
|
-
}),
|
|
2236
|
+
}), F;
|
|
2237
2237
|
}
|
|
2238
|
-
function ge(M,
|
|
2239
|
-
const
|
|
2238
|
+
function ge(M, P = {}) {
|
|
2239
|
+
const F = M.nodeName.toLowerCase() === "collision", E = [...M.children];
|
|
2240
2240
|
let J = null;
|
|
2241
2241
|
const S = E.filter((h) => h.nodeName.toLowerCase() === "material")[0];
|
|
2242
2242
|
if (S) {
|
|
2243
2243
|
const h = S.getAttribute("name");
|
|
2244
|
-
h && h in
|
|
2244
|
+
h && h in P ? J = P[h] : J = be(S);
|
|
2245
2245
|
} else
|
|
2246
2246
|
J = new ve();
|
|
2247
|
-
const m =
|
|
2247
|
+
const m = F ? new Qn() : new ei();
|
|
2248
2248
|
return m.urdfNode = M, E.forEach((h) => {
|
|
2249
2249
|
const C = h.nodeName.toLowerCase();
|
|
2250
2250
|
if (C === "geometry") {
|
|
2251
2251
|
const L = h.children[0].nodeName.toLowerCase();
|
|
2252
2252
|
if (L === "mesh") {
|
|
2253
|
-
const k = h.children[0].getAttribute("filename"),
|
|
2254
|
-
if (
|
|
2253
|
+
const k = h.children[0].getAttribute("filename"), U = ke(k);
|
|
2254
|
+
if (U !== null) {
|
|
2255
2255
|
const ae = h.children[0].getAttribute("scale");
|
|
2256
2256
|
if (ae) {
|
|
2257
2257
|
const te = _e(ae);
|
|
2258
2258
|
m.scale.set(te[0], te[1], te[2]);
|
|
2259
2259
|
}
|
|
2260
|
-
se(
|
|
2260
|
+
se(U, I, (te, u) => {
|
|
2261
2261
|
u ? console.error("URDFLoader: Error loading mesh.", u) : te && (te instanceof Ce && (te.material = J), te.position.set(0, 0, 0), te.quaternion.identity(), m.add(te));
|
|
2262
2262
|
});
|
|
2263
2263
|
}
|
|
2264
2264
|
} else if (L === "box") {
|
|
2265
2265
|
const k = new Ce();
|
|
2266
2266
|
k.geometry = new ti(1, 1, 1), k.material = J;
|
|
2267
|
-
const
|
|
2268
|
-
k.scale.set(
|
|
2267
|
+
const U = _e(h.children[0].getAttribute("size"));
|
|
2268
|
+
k.scale.set(U[0], U[1], U[2]), m.add(k);
|
|
2269
2269
|
} else if (L === "sphere") {
|
|
2270
2270
|
const k = new Ce();
|
|
2271
2271
|
k.geometry = new ni(1, 30, 30), k.material = J;
|
|
2272
|
-
const
|
|
2273
|
-
k.scale.set(
|
|
2272
|
+
const U = parseFloat(h.children[0].getAttribute("radius")) || 0;
|
|
2273
|
+
k.scale.set(U, U, U), m.add(k);
|
|
2274
2274
|
} else if (L === "cylinder") {
|
|
2275
2275
|
const k = new Ce();
|
|
2276
2276
|
k.geometry = new ii(1, 1, 1, 30), k.material = J;
|
|
2277
|
-
const
|
|
2278
|
-
k.scale.set(
|
|
2277
|
+
const U = parseFloat(h.children[0].getAttribute("radius")) || 0, ae = parseFloat(h.children[0].getAttribute("length")) || 0;
|
|
2278
|
+
k.scale.set(U, ae, U), k.rotation.set(Math.PI / 2, 0, 0), m.add(k);
|
|
2279
2279
|
}
|
|
2280
2280
|
} else if (C === "origin") {
|
|
2281
2281
|
const L = _e(h.getAttribute("xyz")), k = _e(h.getAttribute("rpy"));
|