@wandelbots/wandelbots-js-react-components 4.3.0-pr.feat-RB-3171-dynamic-motion-visualization.517.b3d22de → 4.3.0-pr.feat-RB-3171-dynamic-motion-visualization.517.1e47966
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-Dl9af0IV.js → MotionGroupVisualizer-Catdk92m.js} +27 -28
- package/dist/{MotionGroupVisualizer-Dl9af0IV.js.map → MotionGroupVisualizer-Catdk92m.js.map} +1 -1
- package/dist/{MotionGroupVisualizer-D5Pmplmp.cjs → MotionGroupVisualizer-DePl371W.cjs} +2 -2
- package/dist/{MotionGroupVisualizer-D5Pmplmp.cjs.map → MotionGroupVisualizer-DePl371W.cjs.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 +2 -2
package/dist/3d.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MotionGroupVisualizer-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./MotionGroupVisualizer-DePl371W.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.LinearAxis=e.LinearAxis;exports.MANUFACTURER_HOME_CONFIGS=e.MANUFACTURER_HOME_CONFIGS;exports.MotionGroupVisualizer=e.MotionGroupVisualizer;exports.PresetEnvironment=e.PresetEnvironment;exports.Robot=e.Robot;exports.RobotCard=e.RobotCard;exports.SafetyZonesRenderer=e.SafetyZonesRenderer;exports.SupportedLinearAxis=e.SupportedLinearAxis;exports.SupportedRobot=e.SupportedRobot;exports.TrajectoryRenderer=e.TrajectoryRenderer;exports.defaultAxisConfig=e.defaultAxisConfig;exports.defaultGetModel=e.defaultGetModel;exports.extractManufacturer=e.extractManufacturer;exports.getDefaultHomeConfig=e.getDefaultHomeConfig;
|
|
2
2
|
//# sourceMappingURL=3d.cjs.js.map
|
package/dist/3d.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as o, L as r, M as s, a as t, P as n, R as i, b as d, S as f, c as u, d as R, T as l, e as C, f as p, g as M, h as S } from "./MotionGroupVisualizer-
|
|
1
|
+
import { C as o, L as r, M as s, a as t, P as n, R as i, b as d, S as f, c as u, d as R, T as l, e as C, f as p, g as M, h as S } from "./MotionGroupVisualizer-Catdk92m.js";
|
|
2
2
|
export {
|
|
3
3
|
o as CollisionSceneRenderer,
|
|
4
4
|
r as LinearAxis,
|
|
@@ -8,9 +8,9 @@ import { useTheme as Te, Card as Le, Box as b, Typography as K, Divider as Z, Bu
|
|
|
8
8
|
import { observer as Ve } from "mobx-react-lite";
|
|
9
9
|
import Ge, { useRef as R, useEffect as M, useCallback as T, useState as V, Suspense as ie, useMemo as O } from "react";
|
|
10
10
|
import { useTranslation as Fe } from "react-i18next";
|
|
11
|
-
import { N as ke, V as ae, c as le, b as ee, M as v, J as
|
|
11
|
+
import { N as ke, V as ae, c as le, b as ee, M as v, J as I } from "./interpolation-Chyc6Hfo.js";
|
|
12
12
|
import { ErrorBoundary as ce } from "react-error-boundary";
|
|
13
|
-
function
|
|
13
|
+
function Pe(e) {
|
|
14
14
|
switch (e.shape_type) {
|
|
15
15
|
case "convex_hull":
|
|
16
16
|
return new re(
|
|
@@ -47,7 +47,7 @@ function Ae(e) {
|
|
|
47
47
|
return console.warn(`${e.shape_type} is not supported`), new x.BufferGeometry();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
|
-
function
|
|
50
|
+
function Ae({
|
|
51
51
|
name: e,
|
|
52
52
|
collider: r,
|
|
53
53
|
children: n
|
|
@@ -64,19 +64,19 @@ function Se({
|
|
|
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: Pe(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
|
+
Ae,
|
|
80
80
|
{
|
|
81
81
|
name: o,
|
|
82
82
|
collider: u,
|
|
@@ -91,7 +91,7 @@ function ot({
|
|
|
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 ot({
|
|
|
99
99
|
) });
|
|
100
100
|
}
|
|
101
101
|
function te() {
|
|
102
|
-
return /* @__PURE__ */ t.jsx(Me, { children: /* @__PURE__ */ t.jsx(
|
|
102
|
+
return /* @__PURE__ */ t.jsx(Me, { children: /* @__PURE__ */ t.jsx(Ie, {}) });
|
|
103
103
|
}
|
|
104
|
-
function
|
|
104
|
+
function Ie({ 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,
|
|
@@ -660,27 +660,27 @@ const at = C(
|
|
|
660
660
|
var $;
|
|
661
661
|
const s = Te(), { t: l } = Fe(), [m, y] = V(!1), p = R(null), j = R(null), [g, z] = V(!1), [F, Re] = V({ width: 400, height: 600 }), [He, ve] = V(0);
|
|
662
662
|
M(() => {
|
|
663
|
-
const
|
|
663
|
+
const S = () => {
|
|
664
664
|
if (j.current) {
|
|
665
665
|
const { offsetWidth: N, offsetHeight: Y } = j.current;
|
|
666
666
|
z(N > Y), Re({ width: N, height: Y });
|
|
667
667
|
}
|
|
668
668
|
};
|
|
669
|
-
|
|
670
|
-
const H = new ResizeObserver(
|
|
669
|
+
S();
|
|
670
|
+
const H = new ResizeObserver(S);
|
|
671
671
|
return j.current && H.observe(j.current), () => {
|
|
672
672
|
H.disconnect();
|
|
673
673
|
};
|
|
674
674
|
}, []);
|
|
675
675
|
const B = T(() => {
|
|
676
|
-
ve((
|
|
676
|
+
ve((S) => S + 1);
|
|
677
677
|
}, []), k = T(() => {
|
|
678
678
|
!o || !u || (y(!0), u());
|
|
679
|
-
}, [o, u]),
|
|
679
|
+
}, [o, u]), P = T(() => {
|
|
680
680
|
!o || !a || (y(!1), a());
|
|
681
681
|
}, [o, a]), W = T(() => {
|
|
682
682
|
m && a && (y(!1), a());
|
|
683
|
-
}, [m, a]), _ = g ? F.width < 350 : F.height < 200,
|
|
683
|
+
}, [m, a]), _ = g ? F.width < 350 : F.height < 200, A = g ? F.height < 310 : F.height < 450;
|
|
684
684
|
return /* @__PURE__ */ t.jsx(
|
|
685
685
|
Le,
|
|
686
686
|
{
|
|
@@ -799,7 +799,7 @@ const at = C(
|
|
|
799
799
|
justifyContent: "space-between"
|
|
800
800
|
},
|
|
801
801
|
children: [
|
|
802
|
-
!
|
|
802
|
+
!A && d && /* @__PURE__ */ t.jsxs(b, { children: [
|
|
803
803
|
/* @__PURE__ */ t.jsx(d, {}),
|
|
804
804
|
/* @__PURE__ */ t.jsx(
|
|
805
805
|
Z,
|
|
@@ -817,7 +817,7 @@ const at = C(
|
|
|
817
817
|
b,
|
|
818
818
|
{
|
|
819
819
|
sx: {
|
|
820
|
-
mt: !
|
|
820
|
+
mt: !A && d ? "auto" : 0
|
|
821
821
|
},
|
|
822
822
|
children: /* @__PURE__ */ t.jsx(
|
|
823
823
|
b,
|
|
@@ -837,10 +837,10 @@ const at = C(
|
|
|
837
837
|
size: "small",
|
|
838
838
|
disabled: !o,
|
|
839
839
|
onMouseDown: k,
|
|
840
|
-
onMouseUp:
|
|
840
|
+
onMouseUp: P,
|
|
841
841
|
onMouseLeave: W,
|
|
842
842
|
onTouchStart: k,
|
|
843
|
-
onTouchEnd:
|
|
843
|
+
onTouchEnd: P,
|
|
844
844
|
sx: {
|
|
845
845
|
textTransform: "none",
|
|
846
846
|
px: 1.5,
|
|
@@ -926,7 +926,7 @@ const at = C(
|
|
|
926
926
|
}
|
|
927
927
|
),
|
|
928
928
|
/* @__PURE__ */ t.jsxs(b, { children: [
|
|
929
|
-
!
|
|
929
|
+
!A && d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
930
930
|
/* @__PURE__ */ t.jsx(d, {}),
|
|
931
931
|
/* @__PURE__ */ t.jsx(
|
|
932
932
|
Z,
|
|
@@ -946,7 +946,7 @@ const at = C(
|
|
|
946
946
|
sx: {
|
|
947
947
|
display: "flex",
|
|
948
948
|
justifyContent: "flex-start",
|
|
949
|
-
mt: !
|
|
949
|
+
mt: !A && 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(
|
|
@@ -958,10 +958,10 @@ const at = C(
|
|
|
958
958
|
size: "small",
|
|
959
959
|
disabled: !o,
|
|
960
960
|
onMouseDown: k,
|
|
961
|
-
onMouseUp:
|
|
961
|
+
onMouseUp: P,
|
|
962
962
|
onMouseLeave: W,
|
|
963
963
|
onTouchStart: k,
|
|
964
|
-
onTouchEnd:
|
|
964
|
+
onTouchEnd: P,
|
|
965
965
|
sx: {
|
|
966
966
|
textTransform: "none",
|
|
967
967
|
px: 1.5,
|
|
@@ -1250,12 +1250,11 @@ const ft = C((e) => {
|
|
|
1250
1250
|
inverseSolver: r,
|
|
1251
1251
|
dhParameters: n,
|
|
1252
1252
|
...i
|
|
1253
|
-
} = e, [o, u] = V(
|
|
1253
|
+
} = e, [o, u] = V(I.RevoluteJoint);
|
|
1254
1254
|
M(() => {
|
|
1255
|
-
|
|
1256
|
-
n != null && n.length && u(((d = n[0]) == null ? void 0 : d.type) ?? P.RevoluteJoint);
|
|
1255
|
+
n.length && u(n[0].type ?? I.RevoluteJoint);
|
|
1257
1256
|
}, [n]);
|
|
1258
|
-
const a = O(() => r === null && o ===
|
|
1257
|
+
const a = O(() => r === null && o === I.RevoluteJoint, [r, o]), f = O(() => r === null && o === I.PrismaticJoint, [r, o]);
|
|
1259
1258
|
return O(() => !!r, [r]) || a ? /* @__PURE__ */ t.jsx(ge, { dhParameters: n, ...i }) : f ? /* @__PURE__ */ t.jsx(be, { dhParameters: n, ...i }) : /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
1260
1259
|
});
|
|
1261
1260
|
export {
|
|
@@ -1275,4 +1274,4 @@ export {
|
|
|
1275
1274
|
$e as g,
|
|
1276
1275
|
ut as h
|
|
1277
1276
|
};
|
|
1278
|
-
//# sourceMappingURL=MotionGroupVisualizer-
|
|
1277
|
+
//# sourceMappingURL=MotionGroupVisualizer-Catdk92m.js.map
|