@wandelbots/wandelbots-js-react-components 4.2.0-pr.feat-JoggingPanelSupportForLinearAxis.514.4eb7fa6 → 4.2.0-pr.fix-RB-3142-yaskawa-turntable.515.cc983de
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/{MotionGroupVisualizer-B0yeuy8B.cjs → MotionGroupVisualizer-DS5PcBH4.cjs} +2 -2
- package/dist/{MotionGroupVisualizer-B0yeuy8B.cjs.map → MotionGroupVisualizer-DS5PcBH4.cjs.map} +1 -1
- package/dist/{MotionGroupVisualizer-Ck631qIj.js → MotionGroupVisualizer-Dfilv6Y_.js} +58 -58
- package/dist/{MotionGroupVisualizer-Ck631qIj.js.map → MotionGroupVisualizer-Dfilv6Y_.js.map} +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/package.json +1 -1
- package/src/components/robots/MotionGroupVisualizer.tsx +3 -3
|
@@ -4,13 +4,13 @@ import { Matrix4 as w, Vector3 as F, Quaternion as z } from "three";
|
|
|
4
4
|
import { ConvexGeometry as te } from "three-stdlib";
|
|
5
5
|
import { useThree as ne, useFrame as re, Canvas as N } from "@react-three/fiber";
|
|
6
6
|
import { Environment as ve, Lightformer as G, Line as O, useGLTF as Me, Bounds as H } from "@react-three/drei";
|
|
7
|
-
import { useTheme as _e, Card as
|
|
8
|
-
import { observer as
|
|
9
|
-
import Fe, { useRef as R, useEffect as _, useCallback as M, useState as
|
|
10
|
-
import { useTranslation as
|
|
7
|
+
import { useTheme as _e, Card as Te, Box as b, Typography as Y, Divider as q, Button as X } from "@mui/material";
|
|
8
|
+
import { observer as ke } from "mobx-react-lite";
|
|
9
|
+
import Fe, { useRef as R, useEffect as _, useCallback as M, useState as k, Suspense as oe, useMemo as Ge } from "react";
|
|
10
|
+
import { useTranslation as Le } from "react-i18next";
|
|
11
11
|
import { N as se, V as ie, c as ae, b as Z, M as v } from "./interpolation-6ZZN4S_x.js";
|
|
12
12
|
import { ErrorBoundary as le } from "react-error-boundary";
|
|
13
|
-
function
|
|
13
|
+
function Ve(e) {
|
|
14
14
|
switch (e.shape_type) {
|
|
15
15
|
case "convex_hull":
|
|
16
16
|
return new te(
|
|
@@ -47,7 +47,7 @@ function ke(e) {
|
|
|
47
47
|
return console.warn(`${e.shape_type} is not supported`), new x.BufferGeometry();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Pe({
|
|
51
51
|
name: e,
|
|
52
52
|
collider: r,
|
|
53
53
|
children: n
|
|
@@ -64,19 +64,19 @@ function Le({
|
|
|
64
64
|
i[2]
|
|
65
65
|
).divideScalar(1e3),
|
|
66
66
|
rotation: new x.Euler(o[0], o[1], o[2], "XYZ"),
|
|
67
|
-
geometry:
|
|
67
|
+
geometry: Ve(r.shape),
|
|
68
68
|
children: n
|
|
69
69
|
}
|
|
70
70
|
);
|
|
71
71
|
}
|
|
72
|
-
function
|
|
72
|
+
function Se({
|
|
73
73
|
name: e,
|
|
74
74
|
colliders: r,
|
|
75
75
|
meshChildrenProvider: n,
|
|
76
76
|
...i
|
|
77
77
|
}) {
|
|
78
78
|
return /* @__PURE__ */ t.jsx("group", { name: e, ...i, children: Object.entries(r).map(([o, u]) => /* @__PURE__ */ t.jsx(
|
|
79
|
-
|
|
79
|
+
Pe,
|
|
80
80
|
{
|
|
81
81
|
name: o,
|
|
82
82
|
collider: u,
|
|
@@ -91,7 +91,7 @@ function rt({
|
|
|
91
91
|
}) {
|
|
92
92
|
const n = e.colliders;
|
|
93
93
|
return /* @__PURE__ */ t.jsx("group", { children: n && /* @__PURE__ */ t.jsx(
|
|
94
|
-
|
|
94
|
+
Se,
|
|
95
95
|
{
|
|
96
96
|
meshChildrenProvider: r,
|
|
97
97
|
colliders: n
|
|
@@ -99,9 +99,9 @@ function rt({
|
|
|
99
99
|
) });
|
|
100
100
|
}
|
|
101
101
|
function Q() {
|
|
102
|
-
return /* @__PURE__ */ t.jsx(ve, { children: /* @__PURE__ */ t.jsx(
|
|
102
|
+
return /* @__PURE__ */ t.jsx(ve, { children: /* @__PURE__ */ t.jsx(Ae, {}) });
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Ae({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
105
105
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
106
106
|
/* @__PURE__ */ t.jsx(
|
|
107
107
|
G,
|
|
@@ -500,7 +500,7 @@ function he({
|
|
|
500
500
|
postModelRender: n,
|
|
501
501
|
...i
|
|
502
502
|
}) {
|
|
503
|
-
const [o, u] =
|
|
503
|
+
const [o, u] = k(null);
|
|
504
504
|
return _(() => {
|
|
505
505
|
(async () => {
|
|
506
506
|
try {
|
|
@@ -569,7 +569,7 @@ const pe = (e, r) => {
|
|
|
569
569
|
instanceUrl: f,
|
|
570
570
|
...l
|
|
571
571
|
}) => {
|
|
572
|
-
const [d, m] =
|
|
572
|
+
const [d, m] = k(null), s = M((h) => {
|
|
573
573
|
m(h);
|
|
574
574
|
}, []);
|
|
575
575
|
_(() => {
|
|
@@ -643,7 +643,7 @@ function We({
|
|
|
643
643
|
) : null;
|
|
644
644
|
}
|
|
645
645
|
const it = I(
|
|
646
|
-
|
|
646
|
+
ke(
|
|
647
647
|
({
|
|
648
648
|
robotName: e,
|
|
649
649
|
programState: r,
|
|
@@ -658,31 +658,31 @@ const it = I(
|
|
|
658
658
|
className: m
|
|
659
659
|
}) => {
|
|
660
660
|
var W;
|
|
661
|
-
const s = _e(), { t: c } =
|
|
661
|
+
const s = _e(), { t: c } = Le(), [h, g] = k(!1), p = R(null), j = R(null), [y, D] = k(!1), [L, be] = k({ width: 400, height: 600 }), [Je, Re] = k(0);
|
|
662
662
|
_(() => {
|
|
663
|
-
const
|
|
663
|
+
const A = () => {
|
|
664
664
|
if (j.current) {
|
|
665
|
-
const { offsetWidth:
|
|
666
|
-
D(
|
|
665
|
+
const { offsetWidth: J, offsetHeight: K } = j.current;
|
|
666
|
+
D(J > K), be({ width: J, height: K });
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
|
-
|
|
670
|
-
const
|
|
671
|
-
return j.current &&
|
|
672
|
-
|
|
669
|
+
A();
|
|
670
|
+
const $ = new ResizeObserver(A);
|
|
671
|
+
return j.current && $.observe(j.current), () => {
|
|
672
|
+
$.disconnect();
|
|
673
673
|
};
|
|
674
674
|
}, []);
|
|
675
675
|
const E = M(() => {
|
|
676
|
-
Re((
|
|
677
|
-
}, []),
|
|
676
|
+
Re((A) => A + 1);
|
|
677
|
+
}, []), V = M(() => {
|
|
678
678
|
!o || !u || (g(!0), u());
|
|
679
|
-
}, [o, u]),
|
|
679
|
+
}, [o, u]), P = M(() => {
|
|
680
680
|
!o || !a || (g(!1), a());
|
|
681
681
|
}, [o, a]), B = M(() => {
|
|
682
682
|
h && a && (g(!1), a());
|
|
683
|
-
}, [h, a]),
|
|
683
|
+
}, [h, a]), T = y ? L.width < 350 : L.height < 200, S = y ? L.height < 310 : L.height < 450;
|
|
684
684
|
return /* @__PURE__ */ t.jsx(
|
|
685
|
-
|
|
685
|
+
Te,
|
|
686
686
|
{
|
|
687
687
|
ref: j,
|
|
688
688
|
className: m,
|
|
@@ -718,9 +718,9 @@ const it = I(
|
|
|
718
718
|
mr: { xs: 0.75, sm: 1, md: 1.5 },
|
|
719
719
|
overflow: "hidden",
|
|
720
720
|
// Prevent content from affecting container size
|
|
721
|
-
display:
|
|
721
|
+
display: T ? "none" : "block"
|
|
722
722
|
},
|
|
723
|
-
children: !
|
|
723
|
+
children: !T && /* @__PURE__ */ t.jsxs(
|
|
724
724
|
N,
|
|
725
725
|
{
|
|
726
726
|
orthographic: !0,
|
|
@@ -763,7 +763,7 @@ const it = I(
|
|
|
763
763
|
display: "flex",
|
|
764
764
|
flexDirection: "column",
|
|
765
765
|
justifyContent: "flex-start",
|
|
766
|
-
width:
|
|
766
|
+
width: T ? "100%" : "50%"
|
|
767
767
|
},
|
|
768
768
|
children: [
|
|
769
769
|
/* @__PURE__ */ t.jsxs(
|
|
@@ -799,7 +799,7 @@ const it = I(
|
|
|
799
799
|
justifyContent: "space-between"
|
|
800
800
|
},
|
|
801
801
|
children: [
|
|
802
|
-
!
|
|
802
|
+
!S && d && /* @__PURE__ */ t.jsxs(b, { children: [
|
|
803
803
|
/* @__PURE__ */ t.jsx(d, {}),
|
|
804
804
|
/* @__PURE__ */ t.jsx(
|
|
805
805
|
q,
|
|
@@ -817,7 +817,7 @@ const it = I(
|
|
|
817
817
|
b,
|
|
818
818
|
{
|
|
819
819
|
sx: {
|
|
820
|
-
mt: !
|
|
820
|
+
mt: !S && d ? "auto" : 0
|
|
821
821
|
},
|
|
822
822
|
children: /* @__PURE__ */ t.jsx(
|
|
823
823
|
b,
|
|
@@ -836,11 +836,11 @@ const it = I(
|
|
|
836
836
|
color: "secondary",
|
|
837
837
|
size: "small",
|
|
838
838
|
disabled: !o,
|
|
839
|
-
onMouseDown:
|
|
840
|
-
onMouseUp:
|
|
839
|
+
onMouseDown: V,
|
|
840
|
+
onMouseUp: P,
|
|
841
841
|
onMouseLeave: B,
|
|
842
|
-
onTouchStart:
|
|
843
|
-
onTouchEnd:
|
|
842
|
+
onTouchStart: V,
|
|
843
|
+
onTouchEnd: P,
|
|
844
844
|
sx: {
|
|
845
845
|
textTransform: "none",
|
|
846
846
|
px: 1.5,
|
|
@@ -884,15 +884,15 @@ const it = I(
|
|
|
884
884
|
b,
|
|
885
885
|
{
|
|
886
886
|
sx: {
|
|
887
|
-
flex:
|
|
887
|
+
flex: T ? 0 : 1,
|
|
888
888
|
position: "relative",
|
|
889
|
-
minHeight:
|
|
890
|
-
height:
|
|
889
|
+
minHeight: T ? 0 : { xs: 120, sm: 150, md: 200 },
|
|
890
|
+
height: T ? 0 : "auto",
|
|
891
891
|
borderRadius: 1,
|
|
892
892
|
overflow: "hidden",
|
|
893
|
-
display:
|
|
893
|
+
display: T ? "none" : "block"
|
|
894
894
|
},
|
|
895
|
-
children: !
|
|
895
|
+
children: !T && /* @__PURE__ */ t.jsxs(
|
|
896
896
|
N,
|
|
897
897
|
{
|
|
898
898
|
orthographic: !0,
|
|
@@ -926,7 +926,7 @@ const it = I(
|
|
|
926
926
|
}
|
|
927
927
|
),
|
|
928
928
|
/* @__PURE__ */ t.jsxs(b, { children: [
|
|
929
|
-
!
|
|
929
|
+
!S && d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
930
930
|
/* @__PURE__ */ t.jsx(d, {}),
|
|
931
931
|
/* @__PURE__ */ t.jsx(
|
|
932
932
|
q,
|
|
@@ -946,7 +946,7 @@ const it = I(
|
|
|
946
946
|
sx: {
|
|
947
947
|
display: "flex",
|
|
948
948
|
justifyContent: "flex-start",
|
|
949
|
-
mt: !
|
|
949
|
+
mt: !S && d ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
|
|
950
950
|
mb: { xs: 0.5, sm: 0.75, md: 1 }
|
|
951
951
|
},
|
|
952
952
|
children: /* @__PURE__ */ t.jsx(
|
|
@@ -957,11 +957,11 @@ const it = I(
|
|
|
957
957
|
color: "secondary",
|
|
958
958
|
size: "small",
|
|
959
959
|
disabled: !o,
|
|
960
|
-
onMouseDown:
|
|
961
|
-
onMouseUp:
|
|
960
|
+
onMouseDown: V,
|
|
961
|
+
onMouseUp: P,
|
|
962
962
|
onMouseLeave: B,
|
|
963
|
-
onTouchStart:
|
|
964
|
-
onTouchEnd:
|
|
963
|
+
onTouchStart: V,
|
|
964
|
+
onTouchEnd: P,
|
|
965
965
|
sx: {
|
|
966
966
|
textTransform: "none",
|
|
967
967
|
px: 1.5,
|
|
@@ -1118,7 +1118,7 @@ const we = I(
|
|
|
1118
1118
|
instanceUrl: f,
|
|
1119
1119
|
...l
|
|
1120
1120
|
}) => {
|
|
1121
|
-
const [d, m] =
|
|
1121
|
+
const [d, m] = k(null), s = M((h) => {
|
|
1122
1122
|
m(h);
|
|
1123
1123
|
}, []);
|
|
1124
1124
|
_(() => {
|
|
@@ -1224,7 +1224,7 @@ const ee = {
|
|
|
1224
1224
|
0
|
|
1225
1225
|
]
|
|
1226
1226
|
};
|
|
1227
|
-
function
|
|
1227
|
+
function $e(e) {
|
|
1228
1228
|
const [r] = e.split("_");
|
|
1229
1229
|
switch (r) {
|
|
1230
1230
|
case "ABB":
|
|
@@ -1242,7 +1242,7 @@ function Ke(e) {
|
|
|
1242
1242
|
}
|
|
1243
1243
|
}
|
|
1244
1244
|
function ct(e, r) {
|
|
1245
|
-
const n =
|
|
1245
|
+
const n = $e(e);
|
|
1246
1246
|
return n && n in ee ? ee[n] : r || null;
|
|
1247
1247
|
}
|
|
1248
1248
|
const ut = I((e) => {
|
|
@@ -1251,9 +1251,9 @@ const ut = I((e) => {
|
|
|
1251
1251
|
inverseSolver: n,
|
|
1252
1252
|
modelFromController: i,
|
|
1253
1253
|
...o
|
|
1254
|
-
} = e, [u, a] =
|
|
1254
|
+
} = e, [u, a] = k(
|
|
1255
1255
|
n
|
|
1256
|
-
), [, f] =
|
|
1256
|
+
), [, f] = k(!1), l = M(async () => {
|
|
1257
1257
|
const m = new se({ instanceUrl: r });
|
|
1258
1258
|
try {
|
|
1259
1259
|
const s = await m.api.motionGroupModels.getMotionGroupKinematicModel(
|
|
@@ -1274,9 +1274,9 @@ const ut = I((e) => {
|
|
|
1274
1274
|
const d = Ge(() => [
|
|
1275
1275
|
"KUKA_DKP250",
|
|
1276
1276
|
"KUKA_DKP500_2",
|
|
1277
|
-
"
|
|
1278
|
-
"
|
|
1279
|
-
"
|
|
1277
|
+
"Yaskawa_TURN1",
|
|
1278
|
+
"Yaskawa_TURN2",
|
|
1279
|
+
"Yaskawa_TURN3"
|
|
1280
1280
|
].includes(i), [i]);
|
|
1281
1281
|
return u || d ? /* @__PURE__ */ t.jsx(
|
|
1282
1282
|
ge,
|
|
@@ -1308,7 +1308,7 @@ export {
|
|
|
1308
1308
|
ge as d,
|
|
1309
1309
|
at as e,
|
|
1310
1310
|
U as f,
|
|
1311
|
-
|
|
1311
|
+
$e as g,
|
|
1312
1312
|
ct as h
|
|
1313
1313
|
};
|
|
1314
|
-
//# sourceMappingURL=MotionGroupVisualizer-
|
|
1314
|
+
//# sourceMappingURL=MotionGroupVisualizer-Dfilv6Y_.js.map
|