ss-component-new 1.3.418 → 1.3.419
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-B1YI5QZW.js → MTLLoader-B7rDleqK.js} +23 -23
- package/dist/{MTLLoader-C9Y2XnL-.cjs → MTLLoader-BOJhMACs.cjs} +1 -1
- package/dist/{OrbitControls-Ccyh9YlF.js → OrbitControls-BGiqTpcW.js} +1 -1
- package/dist/{OrbitControls-DAhl70c3.cjs → OrbitControls-xe0OrNIN.cjs} +1 -1
- package/dist/{URDFLoader-BDJ4XpPA.cjs → URDFLoader-CwOpxnra.cjs} +1 -1
- package/dist/{URDFLoader-BPsQJXGk.js → URDFLoader-D5_AfgKz.js} +142 -142
- package/dist/{animationData-2sId4rTN.js → animationData-DT84e0fs.js} +1 -1
- package/dist/{animationData-CAK1kBGH.cjs → animationData-ivli2h1p.cjs} +1 -1
- package/dist/{array-BCvH5saX.cjs → array-DL4exmEp.cjs} +1 -1
- package/dist/{array-5_aN-RSg.js → array-e-TJy56I.js} +2 -2
- package/dist/{iconfont-DhBD3i21.js → iconfont-BEajso7a.js} +9 -9
- package/dist/{iconfont-Db0I943u.cjs → iconfont-CBTcCzEn.cjs} +1 -1
- package/dist/{index-KnFXe8zy.js → index-0ZieyN8R.js} +10 -10
- package/dist/{index-DBmxk8Dg.cjs → index-4PPFwsCw.cjs} +1 -1
- package/dist/{index-CUTuYmiR.js → index-BK-AFID2.js} +1 -1
- package/dist/{index-LX83VKNp.js → index-BNFgt7R3.js} +1 -1
- package/dist/{index-DOT552KC.cjs → index-BR_29e9U.cjs} +1 -1
- package/dist/{index-I0DByrV_.cjs → index-B_VBi7Dv.cjs} +1 -1
- package/dist/{index-CsZHscyC.js → index-CB53OVF4.js} +4 -4
- package/dist/{index-C-kqu8jD.js → index-CJ10-s6z.js} +1 -1
- package/dist/{index-CAYpRdgT.cjs → index-CN5MAiS1.cjs} +1 -1
- package/dist/{index-DXxKRoZz.js → index-C_TK60WK.js} +2 -2
- package/dist/{index-C-KB6T93.cjs → index-Ca7BH4EP.cjs} +1 -1
- package/dist/{index-D0wF8TiS.cjs → index-CiNeWa9o.cjs} +1 -1
- package/dist/{index-DygiWiME.js → index-CzNsSBhh.js} +1 -1
- package/dist/{index-Dd9DSArU.js → index-Czyamy09.js} +4 -4
- package/dist/{index-CM-KzIjl.cjs → index-D7_u7eXQ.cjs} +1 -1
- package/dist/{index-OACzw1yi.js → index-DH1NtHHK.js} +3 -3
- package/dist/{index-BDhi_PcI.cjs → index-DHhnzBX1.cjs} +1 -1
- package/dist/{index-DM51tAAH.js → index-DI8WLsVg.js} +1 -1
- package/dist/{index-DO0hJOkb.cjs → index-DQyCm6ot.cjs} +1 -1
- package/dist/{index-D5lQkdfc.js → index-DSihYyHo.js} +2 -2
- package/dist/{index-DWCmhlhr.js → index-DTUu8pVe.js} +1 -1
- package/dist/{index-ZYYTejEI.cjs → index-Dmg7YTZK.cjs} +1 -1
- package/dist/{index-B7w9LAJd.cjs → index-DnheuV3p.cjs} +1 -1
- package/dist/{index-CvqMXSiD.cjs → index-DqvBy1g2.cjs} +2 -2
- package/dist/{index-l0u9OUe6.js → index-X3B33cFq.js} +1 -1
- package/dist/{index-D7Mqm_K7.cjs → index-dh34z47J.cjs} +1 -1
- package/dist/{index-xlUX68hj.js → index-erHMTCRQ.js} +2003 -1950
- package/dist/{index-BeiLiIuF.cjs → index-gNcLvr5h.cjs} +1 -1
- package/dist/{index-C9MloMiN.js → index-mv8ftW6R.js} +3 -3
- package/dist/{index-DUQdwsl1.cjs → index-qPN6atoF.cjs} +6 -5
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Dg_y3QFE.cjs → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-Bbd43Yfo.cjs} +107 -107
- package/dist/{index.vue_vue_type_style_index_0_scoped_6b92e250_lang-CLp-qGr4.js → index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BtzbgmrV.js} +1723 -1727
- package/dist/{main-BCV5wABr.js → main-CIC9jx0N.js} +2 -2
- package/dist/{main-CVrSjdZa.cjs → main-Cv6Ifgw-.cjs} +1 -1
- package/dist/ss-component.cjs +1 -1
- package/dist/ss-component.css +1 -1
- package/dist/ss-component.js +8 -8
- package/dist/ss-component2.cjs +1 -1
- package/dist/ss-component2.js +8 -8
- package/dist/{threeModel-CTBU7hYz.cjs → threeModel-CtsFOush.cjs} +1 -1
- package/dist/{threeModel-CRP97nk3.js → threeModel-DLaRjCXW.js} +3 -3
- package/dist/{threePreview-C3Oh-jDn.js → threePreview-B_k16UnN.js} +3 -3
- package/dist/{threePreview-BxA_p_Ex.cjs → threePreview-TKsR9urX.cjs} +1 -1
- package/dist/{threeSceneView-CSLKtmO3.cjs → threeSceneView-HinDtNNV.cjs} +1 -1
- package/dist/{threeSceneView-CxizgM5g.js → threeSceneView-T_LtJLvE.js} +8 -8
- package/dist/{threeSceneViewForCPMPIP-SOJIx50B.js → threeSceneViewForCPMPIP-BvxgKuuA.js} +7 -7
- package/dist/{threeSceneViewForCPMPIP-D6-ggzVs.cjs → threeSceneViewForCPMPIP-Dln5gw9x.cjs} +1 -1
- package/dist/{threeTrackPathView-a0oXlOxT.js → threeTrackPathView-DRDnOaj2.js} +36 -36
- package/dist/{threeTrackPathView-2Sk98yHk.cjs → threeTrackPathView-z-amO9ft.cjs} +1 -1
- package/dist/{threeViewerHost-Cis2c2LQ.cjs → threeViewerHost-D59TWheS.cjs} +1 -1
- package/dist/{threeViewerHost-Cv4psP7K.js → threeViewerHost-DUoBPr0f.js} +2 -2
- package/dist/{urdfTree-Bh8lYJcS.js → urdfTree-Bie8IotE.js} +1 -1
- package/dist/{urdfTree-Bptilitr.cjs → urdfTree-Xed8IScd.cjs} +1 -1
- package/dist/{workpieceTreePanel-DkzHMd39.js → workpieceTreePanel-AeGkIYOQ.js} +12 -12
- package/dist/{workpieceTreePanel-C2xo_k1w.cjs → workpieceTreePanel-Bb50LklL.cjs} +1 -1
- package/package.json +1 -1
- package/dist/obj/model.mtl +0 -42
- package/dist/obj/model.obj +0 -26110
- package/public/obj/model.mtl +0 -42
- package/public/obj/model.obj +0 -26110
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { S as Ln } from "./MTLLoader-
|
|
2
|
-
import {
|
|
1
|
+
import { S as Ln } from "./MTLLoader-B7rDleqK.js";
|
|
2
|
+
import { b2 as vn, au as Rn, J as lt, ai as At, K as In, V as pe, n as he, aE as dt, S as Mn, ar as Tt, C as ut, o as Le, aL as ft, b3 as Sn, k as ve, aU as Se, c as me, ak as Gn, l as On, $ as Pn, P as ht, aJ as qn, i as Un, am as jn, j as Fn, D as Hn, s as pt, ao as Et, aR as mt, aT as Bn, u as Dn, N as ye, aM as zn, Z as bt, aG as Vn, h as Ce, w as Jn, aH as Kn, aK as Wn, aA as Ge, aC as gt, b4 as Yn, b5 as Xn, b6 as yt, b7 as $n, b8 as Zn, b9 as Qn, ba as ei, U as ti, bb as ni, bc as ii, E as si } from "./index.vue_vue_type_style_index_0_scoped_6b92e250_lang-BtzbgmrV.js";
|
|
3
3
|
class wt extends vn {
|
|
4
4
|
/**
|
|
5
5
|
* Constructs a new TGA loader.
|
|
@@ -45,10 +45,10 @@ class wt extends vn {
|
|
|
45
45
|
throw new Error("THREE.TGALoader: Invalid pixel size " + u.pixel_size);
|
|
46
46
|
}
|
|
47
47
|
function R(u, W, z, B, X) {
|
|
48
|
-
let
|
|
48
|
+
let j, D;
|
|
49
49
|
const _ = z.pixel_size >> 3, x = z.width * z.height * _;
|
|
50
50
|
if (W && (D = X.subarray(B, B += z.colormap_length * (z.colormap_size >> 3))), u) {
|
|
51
|
-
|
|
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
69
|
B += W ? z.width * z.height : x
|
|
70
70
|
);
|
|
71
71
|
return {
|
|
72
|
-
pixel_data:
|
|
72
|
+
pixel_data: j,
|
|
73
73
|
palettes: D
|
|
74
74
|
};
|
|
75
75
|
}
|
|
76
|
-
function se(u, W, z, B, X,
|
|
76
|
+
function se(u, W, z, B, X, j, D, _, x) {
|
|
77
77
|
const N = x;
|
|
78
78
|
let f, A = 0, V, le;
|
|
79
79
|
const Ae = C.width;
|
|
80
80
|
for (le = W; le !== B; le += z)
|
|
81
|
-
for (V = X; V !== D; V +=
|
|
81
|
+
for (V = X; V !== D; 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, W, z, B, X,
|
|
85
|
+
function v(u, W, z, B, X, j, D, _) {
|
|
86
86
|
let x, N = 0, f, A;
|
|
87
87
|
const V = C.width;
|
|
88
88
|
for (A = W; A !== B; A += z)
|
|
89
|
-
for (f = X; f !== D; f +=
|
|
89
|
+
for (f = X; f !== D; 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, W, z, B, X,
|
|
93
|
+
function oe(u, W, z, B, X, j, D, _) {
|
|
94
94
|
let x = 0, N, f;
|
|
95
95
|
const A = C.width;
|
|
96
96
|
for (f = W; f !== B; f += z)
|
|
97
|
-
for (N = X; N !== D; N +=
|
|
97
|
+
for (N = X; N !== D; 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, W, z, B, X,
|
|
101
|
+
function I(u, W, z, B, X, j, D, _) {
|
|
102
102
|
let x = 0, N, f;
|
|
103
103
|
const A = C.width;
|
|
104
104
|
for (f = W; f !== B; f += z)
|
|
105
|
-
for (N = X; N !== D; N +=
|
|
105
|
+
for (N = X; N !== D; 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, W, z, B, X,
|
|
109
|
+
function Y(u, W, z, B, X, j, D, _) {
|
|
110
110
|
let x, N = 0, f, A;
|
|
111
111
|
const V = C.width;
|
|
112
112
|
for (A = W; A !== B; A += z)
|
|
113
|
-
for (f = X; f !== D; f +=
|
|
113
|
+
for (f = X; f !== D; 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, W, z, B, X,
|
|
117
|
+
function ne(u, W, z, B, X, j, D, _) {
|
|
118
118
|
let x = 0, N, f;
|
|
119
119
|
const A = C.width;
|
|
120
120
|
for (f = W; f !== B; f += z)
|
|
121
|
-
for (N = X; N !== D; N +=
|
|
121
|
+
for (N = X; N !== D; 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
125
|
function we(u, W, z, B, X) {
|
|
126
|
-
let
|
|
127
|
-
switch ((C.flags & M) >>
|
|
126
|
+
let j, D, _, x, N, f;
|
|
127
|
+
switch ((C.flags & M) >> q) {
|
|
128
128
|
default:
|
|
129
129
|
case J:
|
|
130
|
-
|
|
130
|
+
j = 0, _ = 1, N = W, D = 0, x = 1, f = z;
|
|
131
131
|
break;
|
|
132
|
-
case
|
|
133
|
-
|
|
132
|
+
case F:
|
|
133
|
+
j = 0, _ = 1, N = W, D = z - 1, x = -1, f = -1;
|
|
134
134
|
break;
|
|
135
135
|
case S:
|
|
136
|
-
|
|
136
|
+
j = W - 1, _ = -1, N = -1, D = 0, x = 1, f = z;
|
|
137
137
|
break;
|
|
138
138
|
case E:
|
|
139
|
-
|
|
139
|
+
j = W - 1, _ = -1, N = -1, D = z - 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, D, x, f,
|
|
145
|
+
Y(u, D, x, f, j, _, N, B);
|
|
146
146
|
break;
|
|
147
147
|
case 16:
|
|
148
|
-
ne(u, D, x, f,
|
|
148
|
+
ne(u, D, 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, D, x, f,
|
|
156
|
+
se(u, D, x, f, j, _, N, B, X);
|
|
157
157
|
break;
|
|
158
158
|
case 16:
|
|
159
|
-
v(u, D, x, f,
|
|
159
|
+
v(u, D, x, f, j, _, N, B);
|
|
160
160
|
break;
|
|
161
161
|
case 24:
|
|
162
|
-
oe(u, D, x, f,
|
|
162
|
+
oe(u, D, x, f, j, _, N, B);
|
|
163
163
|
break;
|
|
164
164
|
case 32:
|
|
165
|
-
I(u, D, x, f,
|
|
165
|
+
I(u, D, 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, q = 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 q(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], q);
|
|
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();
|
|
@@ -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;
|
|
@@ -515,7 +515,7 @@ class oi extends lt {
|
|
|
515
515
|
function W(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
|
}
|
|
@@ -556,7 +556,7 @@ 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
562
|
e.vertexWeights = D(s);
|
|
@@ -565,7 +565,7 @@ class oi extends lt {
|
|
|
565
565
|
}
|
|
566
566
|
return e;
|
|
567
567
|
}
|
|
568
|
-
function
|
|
568
|
+
function j(t) {
|
|
569
569
|
const e = {
|
|
570
570
|
inputs: {}
|
|
571
571
|
};
|
|
@@ -626,12 +626,12 @@ class oi extends lt {
|
|
|
626
626
|
for (p = 0, y = o.length; p < y; p++) {
|
|
627
627
|
const H = o[p], O = [];
|
|
628
628
|
for (w = 0; w < H; w++) {
|
|
629
|
-
const
|
|
630
|
-
O.push({ index:
|
|
629
|
+
const P = r[b + d], fe = r[b + c], re = a[fe];
|
|
630
|
+
O.push({ index: P, weight: re }), b += 2;
|
|
631
631
|
}
|
|
632
632
|
for (O.sort(K), w = 0; w < 4; w++) {
|
|
633
|
-
const
|
|
634
|
-
|
|
633
|
+
const P = O[w];
|
|
634
|
+
P !== void 0 ? (i.indices.array.push(P.index), i.weights.array.push(P.weight)) : (i.indices.array.push(0), i.weights.array.push(0));
|
|
635
635
|
}
|
|
636
636
|
}
|
|
637
637
|
for (t.bindShapeMatrix ? i.bindMatrix = new he().fromArray(t.bindShapeMatrix).transpose() : i.bindMatrix = new he().identity(), p = 0, y = l.array.length; p < y; p++) {
|
|
@@ -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];
|
|
@@ -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;
|
|
@@ -1020,7 +1020,7 @@ class oi extends lt {
|
|
|
1020
1020
|
const g = c[l];
|
|
1021
1021
|
switch (l) {
|
|
1022
1022
|
case "double_sided":
|
|
1023
|
-
n.side = g === 1 ? On :
|
|
1023
|
+
n.side = g === 1 ? On : Pn;
|
|
1024
1024
|
break;
|
|
1025
1025
|
case "bump":
|
|
1026
1026
|
n.normalMap = s(g.texture), n.normalScale = new Gn(1, 1);
|
|
@@ -1030,10 +1030,10 @@ class oi extends lt {
|
|
|
1030
1030
|
}
|
|
1031
1031
|
return n;
|
|
1032
1032
|
}
|
|
1033
|
-
function
|
|
1033
|
+
function Pt(t) {
|
|
1034
1034
|
return ee(T.materials[t], Ve);
|
|
1035
1035
|
}
|
|
1036
|
-
function
|
|
1036
|
+
function qt(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 qn(
|
|
1107
1107
|
-n,
|
|
1108
1108
|
n,
|
|
1109
1109
|
i,
|
|
@@ -1179,13 +1179,13 @@ class oi extends lt {
|
|
|
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;
|
|
@@ -1327,8 +1327,8 @@ class oi extends lt {
|
|
|
1327
1327
|
break;
|
|
1328
1328
|
case "polylist":
|
|
1329
1329
|
for (let O = 0; O < y.count; O++) {
|
|
1330
|
-
const
|
|
1331
|
-
switch (
|
|
1330
|
+
const P = y.vcount[O];
|
|
1331
|
+
switch (P) {
|
|
1332
1332
|
case 3:
|
|
1333
1333
|
H += 3;
|
|
1334
1334
|
break;
|
|
@@ -1336,7 +1336,7 @@ class oi extends lt {
|
|
|
1336
1336
|
H += 6;
|
|
1337
1337
|
break;
|
|
1338
1338
|
default:
|
|
1339
|
-
H += (
|
|
1339
|
+
H += (P - 2) * 3;
|
|
1340
1340
|
break;
|
|
1341
1341
|
}
|
|
1342
1342
|
}
|
|
@@ -1346,7 +1346,7 @@ class oi extends lt {
|
|
|
1346
1346
|
}
|
|
1347
1347
|
a.addGroup(p, H, w), p += H, y.material && b.push(y.material);
|
|
1348
1348
|
for (const O in K) {
|
|
1349
|
-
const
|
|
1349
|
+
const P = K[O];
|
|
1350
1350
|
switch (O) {
|
|
1351
1351
|
case "VERTEX":
|
|
1352
1352
|
for (const fe in i) {
|
|
@@ -1354,23 +1354,23 @@ class oi extends lt {
|
|
|
1354
1354
|
switch (fe) {
|
|
1355
1355
|
case "POSITION":
|
|
1356
1356
|
const xe = s.array.length;
|
|
1357
|
-
if (de(y, e[re],
|
|
1357
|
+
if (de(y, e[re], P.offset, s.array), s.stride = e[re].stride, e.skinWeights && e.skinIndices && (de(y, e.skinIndices, P.offset, l.array), de(y, e.skinWeights, P.offset, g.array)), y.hasUV === !1 && t.uvsNeedsFix === !0) {
|
|
1358
1358
|
const Cn = (s.array.length - xe) / s.stride;
|
|
1359
1359
|
for (let ct = 0; ct < Cn; ct++)
|
|
1360
1360
|
r.array.push(0, 0);
|
|
1361
1361
|
}
|
|
1362
1362
|
break;
|
|
1363
1363
|
case "NORMAL":
|
|
1364
|
-
de(y, e[re],
|
|
1364
|
+
de(y, e[re], P.offset, o.array), o.stride = e[re].stride;
|
|
1365
1365
|
break;
|
|
1366
1366
|
case "COLOR":
|
|
1367
|
-
de(y, e[re],
|
|
1367
|
+
de(y, e[re], P.offset, c.array), c.stride = e[re].stride;
|
|
1368
1368
|
break;
|
|
1369
1369
|
case "TEXCOORD":
|
|
1370
|
-
de(y, e[re],
|
|
1370
|
+
de(y, e[re], P.offset, r.array), r.stride = e[re].stride;
|
|
1371
1371
|
break;
|
|
1372
1372
|
case "TEXCOORD1":
|
|
1373
|
-
de(y, e[re],
|
|
1373
|
+
de(y, e[re], P.offset, d.array), r.stride = e[re].stride;
|
|
1374
1374
|
break;
|
|
1375
1375
|
default:
|
|
1376
1376
|
console.warn('THREE.ColladaLoader: Semantic "%s" not handled in geometry build process.', fe);
|
|
@@ -1378,16 +1378,16 @@ class oi extends lt {
|
|
|
1378
1378
|
}
|
|
1379
1379
|
break;
|
|
1380
1380
|
case "NORMAL":
|
|
1381
|
-
de(y, e[
|
|
1381
|
+
de(y, e[P.id], P.offset, o.array), o.stride = e[P.id].stride;
|
|
1382
1382
|
break;
|
|
1383
1383
|
case "COLOR":
|
|
1384
|
-
de(y, e[
|
|
1384
|
+
de(y, e[P.id], P.offset, c.array, !0), c.stride = e[P.id].stride;
|
|
1385
1385
|
break;
|
|
1386
1386
|
case "TEXCOORD":
|
|
1387
|
-
de(y, e[
|
|
1387
|
+
de(y, e[P.id], P.offset, r.array), r.stride = e[P.id].stride;
|
|
1388
1388
|
break;
|
|
1389
1389
|
case "TEXCOORD1":
|
|
1390
|
-
de(y, e[
|
|
1390
|
+
de(y, e[P.id], P.offset, d.array), d.stride = e[P.id].stride;
|
|
1391
1391
|
break;
|
|
1392
1392
|
}
|
|
1393
1393
|
}
|
|
@@ -1424,8 +1424,8 @@ class oi extends lt {
|
|
|
1424
1424
|
c(y), c(K), c(H);
|
|
1425
1425
|
} else if (w > 4)
|
|
1426
1426
|
for (let y = 1, K = w - 2; y <= K; y++) {
|
|
1427
|
-
const H = a + r * 0, O = a + r * y,
|
|
1428
|
-
c(H), c(O), c(
|
|
1427
|
+
const H = a + r * 0, O = a + r * y, P = a + r * (y + 1);
|
|
1428
|
+
c(H), c(O), c(P);
|
|
1429
1429
|
}
|
|
1430
1430
|
a += r * w;
|
|
1431
1431
|
}
|
|
@@ -1784,7 +1784,7 @@ class oi extends lt {
|
|
|
1784
1784
|
}
|
|
1785
1785
|
}
|
|
1786
1786
|
const ce = new he(), Te = new pe();
|
|
1787
|
-
function
|
|
1787
|
+
function Pe(t) {
|
|
1788
1788
|
const e = {
|
|
1789
1789
|
name: t.getAttribute("name") || "",
|
|
1790
1790
|
type: t.getAttribute("type"),
|
|
@@ -1805,7 +1805,7 @@ class oi extends lt {
|
|
|
1805
1805
|
let s;
|
|
1806
1806
|
switch (n.nodeName) {
|
|
1807
1807
|
case "node":
|
|
1808
|
-
e.nodes.push(n.getAttribute("id")),
|
|
1808
|
+
e.nodes.push(n.getAttribute("id")), Pe(n);
|
|
1809
1809
|
break;
|
|
1810
1810
|
case "instance_camera":
|
|
1811
1811
|
e.instanceCameras.push(I(n.getAttribute("url")));
|
|
@@ -1924,10 +1924,10 @@ 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), K = et(y, p.materials), H = p.skeletons, O = w.skin.joints,
|
|
1927
|
+
const p = r[a], w = N(p.id), y = Ye(w.id), K = et(y, p.materials), H = p.skeletons, O = w.skin.joints, P = bn(H, O);
|
|
1928
1928
|
for (let fe = 0, re = K.length; fe < re; fe++) {
|
|
1929
1929
|
const xe = K[fe];
|
|
1930
|
-
xe.isSkinnedMesh && (xe.bind(
|
|
1930
|
+
xe.isSkinnedMesh && (xe.bind(P, w.skin.bindMatrix), xe.normalizeSkinWeights()), e.push(xe);
|
|
1931
1931
|
}
|
|
1932
1932
|
}
|
|
1933
1933
|
for (let a = 0, b = d.length; a < b; a++) {
|
|
@@ -1959,7 +1959,7 @@ class oi extends lt {
|
|
|
1959
1959
|
const i = [];
|
|
1960
1960
|
for (let n = 0, s = t.length; n < s; n++) {
|
|
1961
1961
|
const o = e[t[n]];
|
|
1962
|
-
o === void 0 ? (console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.", t[n]), i.push(yn)) : i.push(
|
|
1962
|
+
o === void 0 ? (console.warn("THREE.ColladaLoader: Material with key %s not found. Apply fallback material.", t[n]), i.push(yn)) : i.push(Pt(o));
|
|
1963
1963
|
}
|
|
1964
1964
|
return i;
|
|
1965
1965
|
}
|
|
@@ -2007,7 +2007,7 @@ class oi extends lt {
|
|
|
2007
2007
|
mn(t);
|
|
2008
2008
|
const i = R(t, "node");
|
|
2009
2009
|
for (let n = 0; n < i.length; n++)
|
|
2010
|
-
e.children.push(
|
|
2010
|
+
e.children.push(Pe(i[n]));
|
|
2011
2011
|
T.visualScenes[t.getAttribute("id")] = e;
|
|
2012
2012
|
}
|
|
2013
2013
|
function nt(t) {
|
|
@@ -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
|
}
|
|
@@ -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], qe = st.getElementsByTagName("parsererror")[0];
|
|
2062
|
+
if (qe !== void 0) {
|
|
2063
|
+
const t = R(qe, "div")[0];
|
|
2064
2064
|
let e;
|
|
2065
|
-
return t ? e = t.textContent : e = En(
|
|
2065
|
+
return t ? e = t.textContent : e = En(qe), 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", qt), $(Z, "library_lights", "light", Bt), $(Z, "library_geometries", "geometry", Jt), $(Z, "library_nodes", "node", Pe), $(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, q), ie(T.clips, W), ie(T.controllers, _), ie(T.images, A), ie(T.effects, ze), ie(T.materials, Ve), ie(T.cameras, Je), ie(T.lights, Ke), ie(T.geometries, We), 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 [q, F] = M.replace(/^package:\/\//, "").split(/\/(.+)/);
|
|
2142
2142
|
if (typeof R == "string")
|
|
2143
|
-
return R.endsWith(
|
|
2143
|
+
return R.endsWith(q) ? R + "/" + F : R + "/" + q + "/" + F;
|
|
2144
2144
|
if (R instanceof Function)
|
|
2145
|
-
return R(
|
|
2145
|
+
return R(q) + "/" + F;
|
|
2146
2146
|
if (typeof R == "object")
|
|
2147
|
-
return
|
|
2147
|
+
return q in R ? R[q] + "/" + F : (console.error(`URDFLoader : ${q} 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 q;
|
|
2151
|
+
M instanceof Document ? q = [...M.children] : M instanceof Element ? q = [M] : q = [...new DOMParser().parseFromString(M, "text/xml").children];
|
|
2152
|
+
const F = q.filter((E) => E.nodeName === "robot").pop();
|
|
2153
|
+
return $(F);
|
|
2154
2154
|
}
|
|
2155
2155
|
function $(M) {
|
|
2156
|
-
const
|
|
2156
|
+
const q = [...M.children], F = q.filter((L) => L.nodeName.toLowerCase() === "link"), E = q.filter((L) => L.nodeName.toLowerCase() === "joint"), J = q.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 q = [...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 = q.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
|
+
q.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 = q.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, q, 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, q[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 q = [...M.children], F = new ve();
|
|
2224
|
+
return F.name = M.getAttribute("name") || "", q.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, q = {}) {
|
|
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 q ? J = q[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"));
|