@wandelbots/wandelbots-js-react-components 3.6.0-pr.feat-model-retrieval-from-rdp.463.3cb7d2e → 3.6.0-pr.feat-model-retrieval-from-rdp.463.d13a3ad
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/3d.cjs.js +1 -1
- package/dist/3d.es.js +1 -1
- package/dist/components/robots/GenericRobot.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/manufacturerHomePositions-Badt_vO2.cjs +2 -0
- package/dist/manufacturerHomePositions-Badt_vO2.cjs.map +1 -0
- package/dist/{manufacturerHomePositions-BaS-GAxw.js → manufacturerHomePositions-CtUNJexK.js} +171 -160
- package/dist/manufacturerHomePositions-CtUNJexK.js.map +1 -0
- package/package.json +1 -1
- package/src/components/robots/GenericRobot.tsx +43 -24
- package/src/components/robots/SupportedRobot.tsx +1 -1
- package/dist/manufacturerHomePositions-BaS-GAxw.js.map +0 -1
- package/dist/manufacturerHomePositions-cD52vnEi.cjs +0 -2
- package/dist/manufacturerHomePositions-cD52vnEi.cjs.map +0 -1
package/dist/{manufacturerHomePositions-BaS-GAxw.js → manufacturerHomePositions-CtUNJexK.js}
RENAMED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { j as t, e as K } from "./externalizeComponent-Dc3fViZA.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as m from "three";
|
|
3
3
|
import { Matrix4 as I, Vector3 as E, Quaternion as ie } from "three";
|
|
4
4
|
import { ConvexGeometry as X } from "three-stdlib";
|
|
5
5
|
import { useThree as ae, useFrame as le, Canvas as B } from "@react-three/fiber";
|
|
@@ -15,7 +15,7 @@ function be(e) {
|
|
|
15
15
|
case "convex_hull":
|
|
16
16
|
return new X(
|
|
17
17
|
e.vertices.map(
|
|
18
|
-
(r) => new
|
|
18
|
+
(r) => new m.Vector3(
|
|
19
19
|
r[0] / 1e3,
|
|
20
20
|
r[1] / 1e3,
|
|
21
21
|
r[2] / 1e3
|
|
@@ -23,28 +23,28 @@ function be(e) {
|
|
|
23
23
|
)
|
|
24
24
|
);
|
|
25
25
|
case "box":
|
|
26
|
-
return new
|
|
26
|
+
return new m.BoxGeometry(
|
|
27
27
|
e.size_x / 1e3,
|
|
28
28
|
e.size_y / 1e3,
|
|
29
29
|
e.size_z / 1e3
|
|
30
30
|
);
|
|
31
31
|
case "sphere":
|
|
32
|
-
return new
|
|
32
|
+
return new m.SphereGeometry(e.radius / 1e3);
|
|
33
33
|
case "capsule":
|
|
34
|
-
return new
|
|
34
|
+
return new m.CapsuleGeometry(
|
|
35
35
|
e.radius / 1e3,
|
|
36
36
|
e.cylinder_height / 1e3
|
|
37
37
|
);
|
|
38
38
|
case "cylinder":
|
|
39
|
-
return new
|
|
39
|
+
return new m.CylinderGeometry(
|
|
40
40
|
e.radius / 1e3,
|
|
41
41
|
e.radius / 1e3,
|
|
42
42
|
e.height / 1e3
|
|
43
43
|
);
|
|
44
44
|
case "rectangle":
|
|
45
|
-
return new
|
|
45
|
+
return new m.BoxGeometry(e.size_x / 1e3, e.size_y / 1e3, 0);
|
|
46
46
|
default:
|
|
47
|
-
return console.warn(`${e.shape_type} is not supported`), new
|
|
47
|
+
return console.warn(`${e.shape_type} is not supported`), new m.BufferGeometry();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
function Me({
|
|
@@ -52,18 +52,18 @@ function Me({
|
|
|
52
52
|
collider: n,
|
|
53
53
|
children: r
|
|
54
54
|
}) {
|
|
55
|
-
var c,
|
|
56
|
-
const s = ((c = n.pose) == null ? void 0 : c.position) ?? [0, 0, 0], o = ((
|
|
55
|
+
var c, a;
|
|
56
|
+
const s = ((c = n.pose) == null ? void 0 : c.position) ?? [0, 0, 0], o = ((a = n.pose) == null ? void 0 : a.orientation) ?? [0, 0, 0];
|
|
57
57
|
return n.margin && console.warn(`${e} margin is not supported`), /* @__PURE__ */ t.jsx(
|
|
58
58
|
"mesh",
|
|
59
59
|
{
|
|
60
60
|
name: e,
|
|
61
|
-
position: new
|
|
61
|
+
position: new m.Vector3(
|
|
62
62
|
s[0],
|
|
63
63
|
s[1],
|
|
64
64
|
s[2]
|
|
65
65
|
).divideScalar(1e3),
|
|
66
|
-
rotation: new
|
|
66
|
+
rotation: new m.Euler(o[0], o[1], o[2], "XYZ"),
|
|
67
67
|
geometry: be(n.shape),
|
|
68
68
|
children: r
|
|
69
69
|
}
|
|
@@ -175,13 +175,13 @@ function ve({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
175
175
|
function _e(e) {
|
|
176
176
|
if (e.length < 3)
|
|
177
177
|
return console.log("Not enough vertices to define a plane"), { isCoplanar: !1 };
|
|
178
|
-
const n = new
|
|
178
|
+
const n = new m.Vector3(e[0].x, e[0].y, e[0].z), r = new m.Vector3(e[1].x, e[1].y, e[1].z), s = new m.Vector3(e[2].x, e[2].y, e[2].z), o = new m.Vector3().subVectors(r, n), c = new m.Vector3().subVectors(s, n), a = new m.Vector3().crossVectors(o, c).normalize();
|
|
179
179
|
for (let f = 3; f < e.length; f++) {
|
|
180
|
-
const
|
|
181
|
-
if (Math.abs(
|
|
180
|
+
const i = new m.Vector3(e[f].x, e[f].y, e[f].z), d = new m.Vector3().subVectors(i, n), h = a.dot(d);
|
|
181
|
+
if (Math.abs(h) > 1e-6)
|
|
182
182
|
return console.log("Vertices are not on the same plane"), { isCoplanar: !1 };
|
|
183
183
|
}
|
|
184
|
-
return { isCoplanar: !0, normal:
|
|
184
|
+
return { isCoplanar: !0, normal: a };
|
|
185
185
|
}
|
|
186
186
|
function et({
|
|
187
187
|
safetyZones: e,
|
|
@@ -189,25 +189,25 @@ function et({
|
|
|
189
189
|
}) {
|
|
190
190
|
return /* @__PURE__ */ t.jsx("group", { ...n, children: e.map((r, s) => {
|
|
191
191
|
let o = [];
|
|
192
|
-
return r.geometry && (r.geometry.compound ? o = r.geometry.compound.child_geometries : r.geometry.convex_hull && (o = [r.geometry])), o.map((c,
|
|
192
|
+
return r.geometry && (r.geometry.compound ? o = r.geometry.compound.child_geometries : r.geometry.convex_hull && (o = [r.geometry])), o.map((c, a) => {
|
|
193
193
|
if (!c.convex_hull) return null;
|
|
194
194
|
const f = c.convex_hull.vertices.map(
|
|
195
|
-
(
|
|
196
|
-
),
|
|
197
|
-
if (
|
|
198
|
-
const
|
|
195
|
+
(h) => new m.Vector3(h.x / 1e3, h.y / 1e3, h.z / 1e3)
|
|
196
|
+
), i = _e(f);
|
|
197
|
+
if (i.isCoplanar && i.normal) {
|
|
198
|
+
const l = new m.Vector3().addVectors(
|
|
199
199
|
f[0],
|
|
200
|
-
|
|
200
|
+
i.normal.multiplyScalar(1e-4)
|
|
201
201
|
);
|
|
202
|
-
f.push(
|
|
202
|
+
f.push(l);
|
|
203
203
|
}
|
|
204
|
-
let
|
|
204
|
+
let d;
|
|
205
205
|
try {
|
|
206
|
-
|
|
207
|
-
} catch (
|
|
208
|
-
return console.log("Error creating ConvexGeometry:",
|
|
206
|
+
d = new X(f);
|
|
207
|
+
} catch (h) {
|
|
208
|
+
return console.log("Error creating ConvexGeometry:", h), null;
|
|
209
209
|
}
|
|
210
|
-
return /* @__PURE__ */ t.jsx("mesh", { geometry:
|
|
210
|
+
return /* @__PURE__ */ t.jsx("mesh", { geometry: d, children: /* @__PURE__ */ t.jsx(
|
|
211
211
|
"meshStandardMaterial",
|
|
212
212
|
{
|
|
213
213
|
attach: "material",
|
|
@@ -217,10 +217,10 @@ function et({
|
|
|
217
217
|
depthWrite: !1,
|
|
218
218
|
transparent: !0,
|
|
219
219
|
polygonOffset: !0,
|
|
220
|
-
polygonOffsetFactor: -
|
|
220
|
+
polygonOffsetFactor: -a
|
|
221
221
|
},
|
|
222
222
|
s
|
|
223
|
-
) }, `${s}-${
|
|
223
|
+
) }, `${s}-${a}`);
|
|
224
224
|
});
|
|
225
225
|
}) });
|
|
226
226
|
}
|
|
@@ -229,7 +229,7 @@ function tt({
|
|
|
229
229
|
...n
|
|
230
230
|
}) {
|
|
231
231
|
var s;
|
|
232
|
-
const r = ((s = e.trajectory) == null ? void 0 : s.map((o) => o.tcp_pose ? new
|
|
232
|
+
const r = ((s = e.trajectory) == null ? void 0 : s.map((o) => o.tcp_pose ? new m.Vector3(
|
|
233
233
|
o.tcp_pose.position.x / 1e3,
|
|
234
234
|
o.tcp_pose.position.z / 1e3,
|
|
235
235
|
-o.tcp_pose.position.y / 1e3
|
|
@@ -252,15 +252,15 @@ async function Q(e) {
|
|
|
252
252
|
const n = (async () => {
|
|
253
253
|
var c;
|
|
254
254
|
const s = new ge({ instanceUrl: void 0 }), o = s.api.motionGroupModels;
|
|
255
|
-
(c = o.axios) != null && c.interceptors && o.axios.interceptors.request.use((
|
|
255
|
+
(c = o.axios) != null && c.interceptors && o.axios.interceptors.request.use((a) => {
|
|
256
256
|
var f;
|
|
257
|
-
return (f =
|
|
257
|
+
return (f = a.url) != null && f.includes("/glb") && (a.responseType = "blob"), a;
|
|
258
258
|
});
|
|
259
259
|
try {
|
|
260
|
-
const
|
|
261
|
-
return URL.createObjectURL(
|
|
262
|
-
} catch (
|
|
263
|
-
throw console.error("Failed to fetch model:",
|
|
260
|
+
const a = await s.api.motionGroupModels.getMotionGroupGlbModel(e);
|
|
261
|
+
return URL.createObjectURL(a);
|
|
262
|
+
} catch (a) {
|
|
263
|
+
throw console.error("Failed to fetch model:", a), a;
|
|
264
264
|
}
|
|
265
265
|
})();
|
|
266
266
|
return D.set(e, n), n;
|
|
@@ -301,51 +301,51 @@ function re({
|
|
|
301
301
|
onRotationChanged: r,
|
|
302
302
|
children: s
|
|
303
303
|
}) {
|
|
304
|
-
const o = v([]), c = v([]),
|
|
304
|
+
const o = v([]), c = v([]), a = v(null), { invalidate: f } = ae();
|
|
305
305
|
F(() => {
|
|
306
|
-
const
|
|
307
|
-
(
|
|
306
|
+
const l = e.joint_position.filter(
|
|
307
|
+
(u) => u !== void 0
|
|
308
308
|
);
|
|
309
|
-
return
|
|
309
|
+
return a.current = new ye(l, {
|
|
310
310
|
tension: 120,
|
|
311
311
|
// Controls spring stiffness - higher values create faster, more responsive motion
|
|
312
312
|
friction: 20,
|
|
313
313
|
// Controls damping - higher values reduce oscillation and create smoother settling
|
|
314
314
|
threshold: 1e-3
|
|
315
315
|
}), () => {
|
|
316
|
-
var
|
|
317
|
-
(
|
|
316
|
+
var u;
|
|
317
|
+
(u = a.current) == null || u.destroy();
|
|
318
318
|
};
|
|
319
|
-
}, []), le((
|
|
320
|
-
if (
|
|
321
|
-
const p =
|
|
322
|
-
|
|
319
|
+
}, []), le((l, u) => {
|
|
320
|
+
if (a.current) {
|
|
321
|
+
const p = a.current.update(u);
|
|
322
|
+
h(), p || f();
|
|
323
323
|
}
|
|
324
324
|
});
|
|
325
|
-
function
|
|
326
|
-
|
|
325
|
+
function i(l) {
|
|
326
|
+
l && (c.current = Ge(l), h(), f());
|
|
327
327
|
}
|
|
328
|
-
function
|
|
329
|
-
var
|
|
330
|
-
o.current =
|
|
328
|
+
function d(l) {
|
|
329
|
+
var u;
|
|
330
|
+
o.current = l, (u = a.current) == null || u.setTarget(l);
|
|
331
331
|
}
|
|
332
|
-
function
|
|
333
|
-
var
|
|
334
|
-
const
|
|
332
|
+
function h() {
|
|
333
|
+
var u;
|
|
334
|
+
const l = ((u = a.current) == null ? void 0 : u.getCurrentValues()) || [];
|
|
335
335
|
if (r)
|
|
336
|
-
r(c.current,
|
|
336
|
+
r(c.current, l);
|
|
337
337
|
else
|
|
338
338
|
for (const [p, x] of c.current.entries()) {
|
|
339
339
|
const g = n[p], b = g.theta || 0, M = g.reverse_rotation_direction ? -1 : 1;
|
|
340
|
-
x.rotation.y = M * (
|
|
340
|
+
x.rotation.y = M * (l[p] || 0) + b;
|
|
341
341
|
}
|
|
342
342
|
}
|
|
343
343
|
return je(() => {
|
|
344
|
-
const
|
|
345
|
-
(
|
|
344
|
+
const l = e.joint_position.filter(
|
|
345
|
+
(u) => u !== void 0
|
|
346
346
|
);
|
|
347
|
-
requestAnimationFrame(() =>
|
|
348
|
-
}), /* @__PURE__ */ t.jsx("group", { ref:
|
|
347
|
+
requestAnimationFrame(() => d(l));
|
|
348
|
+
}), /* @__PURE__ */ t.jsx("group", { ref: i, children: s });
|
|
349
349
|
}
|
|
350
350
|
const Fe = "line", Se = "mesh";
|
|
351
351
|
function Ve({
|
|
@@ -357,28 +357,28 @@ function Ve({
|
|
|
357
357
|
me.useEffect(() => {
|
|
358
358
|
o.current = new Array(n.length).fill(null), c.current = new Array(n.length).fill(null);
|
|
359
359
|
}, [n.length]);
|
|
360
|
-
function
|
|
361
|
-
const
|
|
362
|
-
s.decompose(
|
|
363
|
-
const x =
|
|
364
|
-
|
|
365
|
-
).multiply(new I().makeTranslation(0,
|
|
366
|
-
return s.multiply(g), s.decompose(
|
|
360
|
+
function a(d, h) {
|
|
361
|
+
const l = new E(), u = new ie(), p = new E();
|
|
362
|
+
s.decompose(l, u, p);
|
|
363
|
+
const x = l.clone(), g = new I().makeRotationY(
|
|
364
|
+
d.theta + h * (d.reverse_rotation_direction ? -1 : 1)
|
|
365
|
+
).multiply(new I().makeTranslation(0, d.d / 1e3, 0)).multiply(new I().makeTranslation(d.a / 1e3, 0, 0)).multiply(new I().makeRotationX(d.alpha));
|
|
366
|
+
return s.multiply(g), s.decompose(l, u, p), { a: x, b: l };
|
|
367
367
|
}
|
|
368
|
-
function f(
|
|
368
|
+
function f(d, h, l, u) {
|
|
369
369
|
if (!n)
|
|
370
370
|
return;
|
|
371
|
-
const p = n[
|
|
371
|
+
const p = n[d];
|
|
372
372
|
if (!p)
|
|
373
373
|
return;
|
|
374
|
-
const { a: x, b: g } =
|
|
375
|
-
|
|
374
|
+
const { a: x, b: g } = a(p, u);
|
|
375
|
+
h.geometry.setPositions([x.toArray(), g.toArray()].flat()), l.position.set(g.x, g.y, g.z);
|
|
376
376
|
}
|
|
377
|
-
function
|
|
377
|
+
function i(d, h) {
|
|
378
378
|
s.identity();
|
|
379
|
-
for (let
|
|
380
|
-
const
|
|
381
|
-
|
|
379
|
+
for (let l = 0; l < Math.min(d.length, h.length); l++) {
|
|
380
|
+
const u = o.current[l], p = c.current[l];
|
|
381
|
+
u && p && f(l, u, p, h[l]);
|
|
382
382
|
}
|
|
383
383
|
}
|
|
384
384
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
|
|
@@ -386,26 +386,26 @@ function Ve({
|
|
|
386
386
|
{
|
|
387
387
|
rapidlyChangingMotionState: e,
|
|
388
388
|
dhParameters: n,
|
|
389
|
-
onRotationChanged:
|
|
389
|
+
onRotationChanged: i,
|
|
390
390
|
children: /* @__PURE__ */ t.jsxs("group", { ...r, name: "Scene", children: [
|
|
391
391
|
/* @__PURE__ */ t.jsxs("mesh", { children: [
|
|
392
392
|
/* @__PURE__ */ t.jsx("sphereGeometry", { args: [0.01, 32, 32] }),
|
|
393
393
|
/* @__PURE__ */ t.jsx("meshStandardMaterial", { color: "black", depthTest: !0 })
|
|
394
394
|
] }),
|
|
395
|
-
n.map((
|
|
396
|
-
const { a, b:
|
|
397
|
-
|
|
398
|
-
e.joint_position[
|
|
399
|
-
), p = `dhrobot_J0${
|
|
395
|
+
n.map((d, h) => {
|
|
396
|
+
const { a: l, b: u } = a(
|
|
397
|
+
d,
|
|
398
|
+
e.joint_position[h] ?? 0
|
|
399
|
+
), p = `dhrobot_J0${h}`;
|
|
400
400
|
return /* @__PURE__ */ t.jsxs("group", { name: p, children: [
|
|
401
401
|
/* @__PURE__ */ t.jsx(
|
|
402
402
|
Z,
|
|
403
403
|
{
|
|
404
404
|
ref: (x) => {
|
|
405
|
-
o.current[
|
|
405
|
+
o.current[h] = x;
|
|
406
406
|
},
|
|
407
407
|
name: Fe,
|
|
408
|
-
points: [
|
|
408
|
+
points: [l, u],
|
|
409
409
|
color: "white",
|
|
410
410
|
lineWidth: 5
|
|
411
411
|
}
|
|
@@ -414,16 +414,16 @@ function Ve({
|
|
|
414
414
|
"mesh",
|
|
415
415
|
{
|
|
416
416
|
ref: (x) => {
|
|
417
|
-
c.current[
|
|
417
|
+
c.current[h] = x;
|
|
418
418
|
},
|
|
419
419
|
name: Se,
|
|
420
|
-
position:
|
|
420
|
+
position: u,
|
|
421
421
|
children: [
|
|
422
422
|
/* @__PURE__ */ t.jsx("sphereGeometry", { args: [0.01, 32, 32] }),
|
|
423
423
|
/* @__PURE__ */ t.jsx("meshStandardMaterial", { color: "black", depthTest: !0 })
|
|
424
424
|
]
|
|
425
425
|
},
|
|
426
|
-
"mesh_" +
|
|
426
|
+
"mesh_" + h
|
|
427
427
|
)
|
|
428
428
|
] }, p);
|
|
429
429
|
})
|
|
@@ -448,36 +448,47 @@ function De({
|
|
|
448
448
|
postModelRender: r,
|
|
449
449
|
...s
|
|
450
450
|
}) {
|
|
451
|
-
const o = ue(e)
|
|
452
|
-
|
|
453
|
-
|
|
451
|
+
const o = ue(e);
|
|
452
|
+
let c;
|
|
453
|
+
try {
|
|
454
|
+
c = Ie(o, "robot.glb").gltf;
|
|
455
|
+
} catch (i) {
|
|
456
|
+
console.warn("parseRobotModel failed:", i), c = o;
|
|
457
|
+
}
|
|
458
|
+
const a = G(
|
|
459
|
+
(i) => {
|
|
460
|
+
i && r && r();
|
|
454
461
|
},
|
|
455
462
|
[r]
|
|
456
463
|
);
|
|
457
|
-
function f(
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
"group",
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
464
|
+
function f(i) {
|
|
465
|
+
try {
|
|
466
|
+
return Te(i) ? i.geometry ? /* @__PURE__ */ t.jsx(
|
|
467
|
+
"mesh",
|
|
468
|
+
{
|
|
469
|
+
name: i.name,
|
|
470
|
+
geometry: i.geometry,
|
|
471
|
+
material: i.material,
|
|
472
|
+
position: i.position,
|
|
473
|
+
rotation: i.rotation
|
|
474
|
+
},
|
|
475
|
+
i.uuid
|
|
476
|
+
) : /* @__PURE__ */ t.jsx("group", { name: i.name, position: i.position, rotation: i.rotation }, i.uuid) : /* @__PURE__ */ t.jsx(
|
|
477
|
+
"group",
|
|
478
|
+
{
|
|
479
|
+
name: i.name,
|
|
480
|
+
position: i.position,
|
|
481
|
+
rotation: i.rotation,
|
|
482
|
+
ref: ee(i) ? n : void 0,
|
|
483
|
+
children: i.children.map(f)
|
|
484
|
+
},
|
|
485
|
+
i.uuid
|
|
486
|
+
);
|
|
487
|
+
} catch (d) {
|
|
488
|
+
return console.warn("Error rendering node", i.name, d), null;
|
|
489
|
+
}
|
|
479
490
|
}
|
|
480
|
-
return /* @__PURE__ */ t.jsx("group", { ...s, dispose: null, ref:
|
|
491
|
+
return /* @__PURE__ */ t.jsx("group", { ...s, dispose: null, ref: a, children: f(c.scene) });
|
|
481
492
|
}
|
|
482
493
|
function ke({
|
|
483
494
|
modelURL: e,
|
|
@@ -511,17 +522,17 @@ function ke({
|
|
|
511
522
|
}
|
|
512
523
|
const Ae = (e, n) => {
|
|
513
524
|
e.userData.isGhost || (e.traverse((r) => {
|
|
514
|
-
if (r instanceof
|
|
515
|
-
r.material instanceof
|
|
525
|
+
if (r instanceof m.Mesh) {
|
|
526
|
+
r.material instanceof m.Material && (r.material.colorWrite = !1);
|
|
516
527
|
const s = r.clone(), o = r.clone();
|
|
517
|
-
s.material = new
|
|
528
|
+
s.material = new m.MeshStandardMaterial({
|
|
518
529
|
depthTest: !0,
|
|
519
530
|
depthWrite: !0,
|
|
520
531
|
colorWrite: !1,
|
|
521
532
|
polygonOffset: !0,
|
|
522
533
|
polygonOffsetFactor: -1,
|
|
523
|
-
side:
|
|
524
|
-
}), s.userData.isGhost = !0, o.material = new
|
|
534
|
+
side: m.DoubleSide
|
|
535
|
+
}), s.userData.isGhost = !0, o.material = new m.MeshStandardMaterial({
|
|
525
536
|
color: n,
|
|
526
537
|
opacity: 0.3,
|
|
527
538
|
depthTest: !0,
|
|
@@ -529,7 +540,7 @@ const Ae = (e, n) => {
|
|
|
529
540
|
transparent: !0,
|
|
530
541
|
polygonOffset: !0,
|
|
531
542
|
polygonOffsetFactor: -2,
|
|
532
|
-
side:
|
|
543
|
+
side: m.DoubleSide
|
|
533
544
|
}), o.userData.isGhost = !0, r.parent && (r.parent.add(s), r.parent.add(o));
|
|
534
545
|
}
|
|
535
546
|
}), e.userData.isGhost = !0);
|
|
@@ -538,7 +549,7 @@ const Ae = (e, n) => {
|
|
|
538
549
|
const n = [];
|
|
539
550
|
e.traverse((r) => {
|
|
540
551
|
var s;
|
|
541
|
-
r instanceof
|
|
552
|
+
r instanceof m.Mesh && ((s = r.userData) != null && s.isGhost ? n.push(r) : r.material instanceof m.Material && (r.material.colorWrite = !0));
|
|
542
553
|
}), n.forEach((r) => {
|
|
543
554
|
r.parent && r.parent.remove(r);
|
|
544
555
|
}), e.userData.isGhost = !1;
|
|
@@ -550,16 +561,16 @@ const Ae = (e, n) => {
|
|
|
550
561
|
getModel: s = Q,
|
|
551
562
|
flangeRef: o,
|
|
552
563
|
postModelRender: c,
|
|
553
|
-
transparentColor:
|
|
564
|
+
transparentColor: a,
|
|
554
565
|
...f
|
|
555
566
|
}) => {
|
|
556
|
-
const [
|
|
557
|
-
|
|
567
|
+
const [i, d] = _(null), h = G((u) => {
|
|
568
|
+
d(u);
|
|
558
569
|
}, []);
|
|
559
570
|
F(() => {
|
|
560
|
-
|
|
561
|
-
}, [
|
|
562
|
-
const
|
|
571
|
+
i && (a ? Ae(i, a) : Pe(i));
|
|
572
|
+
}, [i, a]);
|
|
573
|
+
const l = /* @__PURE__ */ t.jsx(
|
|
563
574
|
Ve,
|
|
564
575
|
{
|
|
565
576
|
rapidlyChangingMotionState: e,
|
|
@@ -570,12 +581,12 @@ const Ae = (e, n) => {
|
|
|
570
581
|
return /* @__PURE__ */ t.jsxs(
|
|
571
582
|
we,
|
|
572
583
|
{
|
|
573
|
-
fallback:
|
|
574
|
-
onError: (
|
|
575
|
-
console.
|
|
584
|
+
fallback: l,
|
|
585
|
+
onError: (u) => {
|
|
586
|
+
console.warn(u);
|
|
576
587
|
},
|
|
577
588
|
children: [
|
|
578
|
-
/* @__PURE__ */ t.jsx(pe, { fallback:
|
|
589
|
+
/* @__PURE__ */ t.jsx(pe, { fallback: l, children: /* @__PURE__ */ t.jsx("group", { ref: h, children: /* @__PURE__ */ t.jsx(
|
|
579
590
|
re,
|
|
580
591
|
{
|
|
581
592
|
rapidlyChangingMotionState: e,
|
|
@@ -584,12 +595,12 @@ const Ae = (e, n) => {
|
|
|
584
595
|
ke,
|
|
585
596
|
{
|
|
586
597
|
modelURL: (() => {
|
|
587
|
-
const
|
|
588
|
-
if (!
|
|
598
|
+
const u = s(n);
|
|
599
|
+
if (!u) {
|
|
589
600
|
const p = new Blob([], { type: "model/gltf-binary" }), x = new File([p], `${n}.glb`, { type: "model/gltf-binary" });
|
|
590
601
|
return Promise.resolve(URL.createObjectURL(x));
|
|
591
602
|
}
|
|
592
|
-
return
|
|
603
|
+
return u;
|
|
593
604
|
})(),
|
|
594
605
|
postModelRender: c,
|
|
595
606
|
flangeRef: o,
|
|
@@ -635,14 +646,14 @@ const rt = K(
|
|
|
635
646
|
operationMode: s,
|
|
636
647
|
driveToHomeEnabled: o = !1,
|
|
637
648
|
onDriveToHomePress: c,
|
|
638
|
-
onDriveToHomeRelease:
|
|
649
|
+
onDriveToHomeRelease: a,
|
|
639
650
|
connectedMotionGroup: f,
|
|
640
|
-
robotComponent:
|
|
641
|
-
customContentComponent:
|
|
642
|
-
className:
|
|
651
|
+
robotComponent: i = Oe,
|
|
652
|
+
customContentComponent: d,
|
|
653
|
+
className: h
|
|
643
654
|
}) => {
|
|
644
655
|
var P;
|
|
645
|
-
const
|
|
656
|
+
const l = fe(), { t: u } = xe(), [p, x] = _(!1), g = v(null), b = v(null), [M, ne] = _(!1), [S, oe] = _({ width: 400, height: 600 }), [Ee, se] = _(0);
|
|
646
657
|
F(() => {
|
|
647
658
|
const T = () => {
|
|
648
659
|
if (b.current) {
|
|
@@ -661,15 +672,15 @@ const rt = K(
|
|
|
661
672
|
}, []), V = G(() => {
|
|
662
673
|
!o || !c || (x(!0), c());
|
|
663
674
|
}, [o, c]), C = G(() => {
|
|
664
|
-
!o || !
|
|
665
|
-
}, [o,
|
|
666
|
-
p &&
|
|
667
|
-
}, [p,
|
|
675
|
+
!o || !a || (x(!1), a());
|
|
676
|
+
}, [o, a]), A = G(() => {
|
|
677
|
+
p && a && (x(!1), a());
|
|
678
|
+
}, [p, a]), w = M ? S.width < 350 : S.height < 200, L = M ? S.height < 310 : S.height < 450;
|
|
668
679
|
return /* @__PURE__ */ t.jsx(
|
|
669
680
|
de,
|
|
670
681
|
{
|
|
671
682
|
ref: b,
|
|
672
|
-
className:
|
|
683
|
+
className: h,
|
|
673
684
|
sx: {
|
|
674
685
|
width: "100%",
|
|
675
686
|
height: "100%",
|
|
@@ -680,10 +691,10 @@ const rt = K(
|
|
|
680
691
|
minWidth: { xs: 180, sm: 220, md: 250 },
|
|
681
692
|
minHeight: M ? { xs: 200, sm: 240, md: 260 } : { xs: 150, sm: 180, md: 220 },
|
|
682
693
|
// Allow progressive hiding in portrait mode
|
|
683
|
-
border: `1px solid ${
|
|
694
|
+
border: `1px solid ${l.palette.divider}`,
|
|
684
695
|
borderRadius: "18px",
|
|
685
696
|
boxShadow: "none",
|
|
686
|
-
backgroundColor: ((P =
|
|
697
|
+
backgroundColor: ((P = l.palette.backgroundPaperElevation) == null ? void 0 : P[8]) || "#2A2A3F",
|
|
687
698
|
backgroundImage: "none"
|
|
688
699
|
// Override any gradient from elevation
|
|
689
700
|
},
|
|
@@ -715,7 +726,7 @@ const rt = K(
|
|
|
715
726
|
shadows: !0,
|
|
716
727
|
frameloop: "demand",
|
|
717
728
|
style: {
|
|
718
|
-
borderRadius:
|
|
729
|
+
borderRadius: l.shape.borderRadius,
|
|
719
730
|
width: "100%",
|
|
720
731
|
height: "100%",
|
|
721
732
|
background: "transparent",
|
|
@@ -728,7 +739,7 @@ const rt = K(
|
|
|
728
739
|
children: [
|
|
729
740
|
/* @__PURE__ */ t.jsx(Y, {}),
|
|
730
741
|
/* @__PURE__ */ t.jsx(W, { fit: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ t.jsx(
|
|
731
|
-
|
|
742
|
+
i,
|
|
732
743
|
{
|
|
733
744
|
connectedMotionGroup: f,
|
|
734
745
|
postModelRender: k
|
|
@@ -783,15 +794,15 @@ const rt = K(
|
|
|
783
794
|
justifyContent: "space-between"
|
|
784
795
|
},
|
|
785
796
|
children: [
|
|
786
|
-
!L &&
|
|
787
|
-
/* @__PURE__ */ t.jsx(
|
|
797
|
+
!L && d && /* @__PURE__ */ t.jsxs(y, { children: [
|
|
798
|
+
/* @__PURE__ */ t.jsx(d, {}),
|
|
788
799
|
/* @__PURE__ */ t.jsx(
|
|
789
800
|
N,
|
|
790
801
|
{
|
|
791
802
|
sx: {
|
|
792
803
|
mt: 1,
|
|
793
804
|
mb: 0,
|
|
794
|
-
borderColor:
|
|
805
|
+
borderColor: l.palette.divider,
|
|
795
806
|
opacity: 0.5
|
|
796
807
|
}
|
|
797
808
|
}
|
|
@@ -801,7 +812,7 @@ const rt = K(
|
|
|
801
812
|
y,
|
|
802
813
|
{
|
|
803
814
|
sx: {
|
|
804
|
-
mt: !L &&
|
|
815
|
+
mt: !L && d ? "auto" : 0
|
|
805
816
|
},
|
|
806
817
|
children: /* @__PURE__ */ t.jsx(
|
|
807
818
|
y,
|
|
@@ -830,7 +841,7 @@ const rt = K(
|
|
|
830
841
|
px: 1.5,
|
|
831
842
|
py: 0.5
|
|
832
843
|
},
|
|
833
|
-
children:
|
|
844
|
+
children: u("RobotCard.DriveToHome.bt")
|
|
834
845
|
}
|
|
835
846
|
)
|
|
836
847
|
}
|
|
@@ -887,7 +898,7 @@ const rt = K(
|
|
|
887
898
|
shadows: !0,
|
|
888
899
|
frameloop: "demand",
|
|
889
900
|
style: {
|
|
890
|
-
borderRadius:
|
|
901
|
+
borderRadius: l.shape.borderRadius,
|
|
891
902
|
width: "100%",
|
|
892
903
|
height: "100%",
|
|
893
904
|
background: "transparent",
|
|
@@ -898,7 +909,7 @@ const rt = K(
|
|
|
898
909
|
children: [
|
|
899
910
|
/* @__PURE__ */ t.jsx(Y, {}),
|
|
900
911
|
/* @__PURE__ */ t.jsx(W, { fit: !0, clip: !0, observe: !0, margin: 1, maxDuration: 1, children: /* @__PURE__ */ t.jsx(
|
|
901
|
-
|
|
912
|
+
i,
|
|
902
913
|
{
|
|
903
914
|
connectedMotionGroup: f,
|
|
904
915
|
postModelRender: k
|
|
@@ -910,15 +921,15 @@ const rt = K(
|
|
|
910
921
|
}
|
|
911
922
|
),
|
|
912
923
|
/* @__PURE__ */ t.jsxs(y, { children: [
|
|
913
|
-
!L &&
|
|
914
|
-
/* @__PURE__ */ t.jsx(
|
|
924
|
+
!L && d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
925
|
+
/* @__PURE__ */ t.jsx(d, {}),
|
|
915
926
|
/* @__PURE__ */ t.jsx(
|
|
916
927
|
N,
|
|
917
928
|
{
|
|
918
929
|
sx: {
|
|
919
930
|
mt: 1,
|
|
920
931
|
mb: 0,
|
|
921
|
-
borderColor:
|
|
932
|
+
borderColor: l.palette.divider,
|
|
922
933
|
opacity: 0.5
|
|
923
934
|
}
|
|
924
935
|
}
|
|
@@ -930,7 +941,7 @@ const rt = K(
|
|
|
930
941
|
sx: {
|
|
931
942
|
display: "flex",
|
|
932
943
|
justifyContent: "flex-start",
|
|
933
|
-
mt: !L &&
|
|
944
|
+
mt: !L && d ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
|
|
934
945
|
mb: { xs: 0.5, sm: 0.75, md: 1 }
|
|
935
946
|
},
|
|
936
947
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -951,7 +962,7 @@ const rt = K(
|
|
|
951
962
|
px: 1.5,
|
|
952
963
|
py: 0.5
|
|
953
964
|
},
|
|
954
|
-
children:
|
|
965
|
+
children: u("RobotCard.DriveToHome.bt")
|
|
955
966
|
}
|
|
956
967
|
)
|
|
957
968
|
}
|
|
@@ -1022,4 +1033,4 @@ export {
|
|
|
1022
1033
|
Ue as e,
|
|
1023
1034
|
ot as g
|
|
1024
1035
|
};
|
|
1025
|
-
//# sourceMappingURL=manufacturerHomePositions-
|
|
1036
|
+
//# sourceMappingURL=manufacturerHomePositions-CtUNJexK.js.map
|