@wandelbots/wandelbots-js-react-components 3.6.2 → 3.7.1
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/RobotAnimator.d.ts.map +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/{manufacturerHomePositions-CgaG5vaK.js → manufacturerHomePositions-BW0KbWeg.js} +123 -119
- package/dist/manufacturerHomePositions-BW0KbWeg.js.map +1 -0
- package/dist/manufacturerHomePositions-r9dAEtsx.cjs +2 -0
- package/dist/manufacturerHomePositions-r9dAEtsx.cjs.map +1 -0
- package/package.json +1 -1
- package/src/components/robots/RobotAnimator.tsx +23 -8
- package/dist/manufacturerHomePositions-Ca80ycLi.cjs +0 -2
- package/dist/manufacturerHomePositions-Ca80ycLi.cjs.map +0 -1
- package/dist/manufacturerHomePositions-CgaG5vaK.js.map +0 -1
package/dist/3d.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./manufacturerHomePositions-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./manufacturerHomePositions-r9dAEtsx.cjs");exports.CollisionSceneRenderer=e.CollisionSceneRenderer;exports.MANUFACTURER_HOME_CONFIGS=e.MANUFACTURER_HOME_CONFIGS;exports.PresetEnvironment=e.PresetEnvironment;exports.Robot=e.Robot;exports.RobotCard=e.RobotCard;exports.SafetyZonesRenderer=e.SafetyZonesRenderer;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, M as r, P as t, b as s, R as n, S as d, c as R, T as f, a as C, d as i, e as l, g as u } from "./manufacturerHomePositions-
|
|
1
|
+
import { C as o, M as r, P as t, b as s, R as n, S as d, c as R, T as f, a as C, d as i, e as l, g as u } from "./manufacturerHomePositions-BW0KbWeg.js";
|
|
2
2
|
export {
|
|
3
3
|
o as CollisionSceneRenderer,
|
|
4
4
|
r as MANUFACTURER_HOME_CONFIGS,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"RobotAnimator.d.ts","sourceRoot":"","sources":["../../../src/components/robots/RobotAnimator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,
|
|
1
|
+
{"version":3,"file":"RobotAnimator.d.ts","sourceRoot":"","sources":["../../../src/components/robots/RobotAnimator.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AAC3E,OAAO,KAAyC,MAAM,OAAO,CAAA;AAC7D,OAAO,KAAK,EAAS,QAAQ,EAAE,MAAM,OAAO,CAAA;AAK5C,KAAK,kBAAkB,GAAG;IACxB,0BAA0B,EAAE,gBAAgB,CAAA;IAC5C,YAAY,EAAE,WAAW,EAAE,CAAA;IAC3B,iBAAiB,CAAC,EAAE,CAAC,MAAM,EAAE,QAAQ,EAAE,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,IAAI,CAAA;IACvE,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAA;CAC1B,CAAA;AAED,MAAM,CAAC,OAAO,UAAU,aAAa,CAAC,EACpC,0BAA0B,EAC1B,YAAY,EACZ,iBAAiB,EACjB,QAAQ,GACT,EAAE,kBAAkB,2CA4FpB"}
|
package/dist/index.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./manufacturerHomePositions-
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("./manufacturerHomePositions-r9dAEtsx.cjs"),e=require("./theming-CKlFOjJ_.cjs"),r=require("./LoadingCover-r2yhJZF9.cjs"),t=require("./index-CqMZL0FV.cjs"),a=require("./index-DxwppshT.cjs"),n=require("./WandelscriptEditor-Dj7TBCkF.cjs");exports.CollisionSceneRenderer=o.CollisionSceneRenderer;exports.MANUFACTURER_HOME_CONFIGS=o.MANUFACTURER_HOME_CONFIGS;exports.PresetEnvironment=o.PresetEnvironment;exports.Robot=o.Robot;exports.RobotCard=o.RobotCard;exports.SafetyZonesRenderer=o.SafetyZonesRenderer;exports.SupportedRobot=o.SupportedRobot;exports.TrajectoryRenderer=o.TrajectoryRenderer;exports.defaultAxisConfig=o.defaultAxisConfig;exports.defaultGetModel=o.defaultGetModel;exports.extractManufacturer=o.extractManufacturer;exports.getDefaultHomeConfig=o.getDefaultHomeConfig;exports.AppHeader=e.AppHeader;exports.ConnectedMotionGroup=e.ConnectedMotionGroup;exports.CycleTimer=e.CycleTimer;exports.JoggerConnection=e.JoggerConnection;exports.JoggingCartesianAxisControl=e.JoggingCartesianAxisControl;exports.JoggingJointRotationControl=e.JoggingJointRotationControl;exports.JoggingPanel=e.JoggingPanel;exports.JoggingStore=e.JoggingStore;exports.LogPanel=e.LogPanel;exports.LogStore=e.LogStore;exports.LogViewer=e.LogViewer;exports.MotionStreamConnection=e.MotionStreamConnection;exports.NoMotionGroupModal=e.NoMotionGroupModal;exports.PoseCartesianValues=e.PoseCartesianValues;exports.PoseJointValues=e.PoseJointValues;exports.RobotListItem=e.RobotListItem;exports.RobotSetupReadinessIndicator=e.RobotSetupReadinessIndicator;exports.RobotSetupReadinessState=e.RobotSetupReadinessState;exports.SafetyBar=e.SafetyBar;exports.SelectableFab=e.SelectableFab;exports.TabBar=e.TabBar;exports.Timer=e.Timer;exports.VelocitySlider=e.VelocitySlider;exports.VelocitySliderLabel=e.VelocitySliderLabel;exports.WandelbotsDataGrid=e.WandelbotsDataGrid;exports.createDebugMessage=e.createDebugMessage;exports.createErrorMessage=e.createErrorMessage;exports.createInfoMessage=e.createInfoMessage;exports.createLogMessage=e.createLogMessage;exports.createNovaMuiTheme=e.createNovaMuiTheme;exports.createWarningMessage=e.createWarningMessage;exports.jointValuesEqual=e.jointValuesEqual;exports.poseEqual=e.poseEqual;exports.tcpMotionEqual=e.tcpMotionEqual;exports.unwrapRotationVector=e.unwrapRotationVector;exports.LoadingCover=r.LoadingCover;exports.LoadingErrorMessage=r.LoadingErrorMessage;exports.ProgramControl=t.ProgramControl;exports.ProgramState=t.ProgramState;exports.ProgramStateIndicator=t.ProgramStateIndicator;exports.ValueInterpolator=t.ValueInterpolator;exports.useAnimationFrame=t.useAnimationFrame;exports.useAutorun=t.useAutorun;exports.useInterpolation=t.useInterpolation;exports.useMounted=t.useMounted;exports.useReaction=t.useReaction;exports.i18n=a.i18n;exports.WandelscriptEditor=n.WandelscriptEditor;
|
|
2
2
|
//# sourceMappingURL=index.cjs.js.map
|
package/dist/index.es.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { C as o, M as s, P as t, b as r, R as n, S as i, c as g, T as l, a as u, d, e as c, g as p } from "./manufacturerHomePositions-
|
|
1
|
+
import { C as o, M as s, P as t, b as r, R as n, S as i, c as g, T as l, a as u, d, e as c, g as p } from "./manufacturerHomePositions-BW0KbWeg.js";
|
|
2
2
|
import { A as M, r as C, C as R, s as S, a as f, b, d as P, J as L, f as V, L as x, l as E, M as A, N as J, P as T, e as I, R as y, n as G, m as N, S as W, o as q, T as v, p as F, V as j, q as w, W as D, h as H, k as h, i as B, g as O, c as U, j as _, t as k, u as Z, v as z, w as K } from "./theming-DxiD0Q3m.js";
|
|
3
3
|
import { L as X, a as Y } from "./LoadingCover-Dr9hDTku.js";
|
|
4
4
|
import { a as aa, P as ea, b as oa, V as sa, e as ta, c as ra, f as na, u as ia, d as ga } from "./index-CxasuX80.js";
|
package/dist/{manufacturerHomePositions-CgaG5vaK.js → manufacturerHomePositions-BW0KbWeg.js}
RENAMED
|
@@ -1,21 +1,21 @@
|
|
|
1
1
|
import { j as t, e as q } from "./index-CAib4NKw.js";
|
|
2
|
-
import * as
|
|
2
|
+
import * as h from "three";
|
|
3
3
|
import { Matrix4 as G, Vector3 as L, 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 W } from "@react-three/fiber";
|
|
6
6
|
import { Environment as ce, Lightformer as v, Line as Z, useGLTF as ue, Bounds as $ } from "@react-three/drei";
|
|
7
|
-
import { useTheme as fe, Card as de, Box as y, Typography as B, Divider as H, Button as
|
|
7
|
+
import { useTheme as fe, Card as de, Box as y, Typography as B, Divider as H, Button as J } from "@mui/material";
|
|
8
8
|
import { observer as he } from "mobx-react-lite";
|
|
9
|
-
import me, { useRef as
|
|
9
|
+
import me, { useRef as _, useEffect as F, useCallback as R, useState as V, Suspense as pe } from "react";
|
|
10
10
|
import { useTranslation as xe } from "react-i18next";
|
|
11
|
-
import { V as ge, c as ye, b as
|
|
11
|
+
import { V as ge, c as ye, b as U, M as j } from "./index-CxasuX80.js";
|
|
12
12
|
import { ErrorBoundary as je } from "react-error-boundary";
|
|
13
13
|
function we(e) {
|
|
14
14
|
switch (e.shape_type) {
|
|
15
15
|
case "convex_hull":
|
|
16
16
|
return new X(
|
|
17
17
|
e.vertices.map(
|
|
18
|
-
(r) => new
|
|
18
|
+
(r) => new h.Vector3(
|
|
19
19
|
r[0] / 1e3,
|
|
20
20
|
r[1] / 1e3,
|
|
21
21
|
r[2] / 1e3
|
|
@@ -23,28 +23,28 @@ function we(e) {
|
|
|
23
23
|
)
|
|
24
24
|
);
|
|
25
25
|
case "box":
|
|
26
|
-
return new
|
|
26
|
+
return new h.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 h.SphereGeometry(e.radius / 1e3);
|
|
33
33
|
case "capsule":
|
|
34
|
-
return new
|
|
34
|
+
return new h.CapsuleGeometry(
|
|
35
35
|
e.radius / 1e3,
|
|
36
36
|
e.cylinder_height / 1e3
|
|
37
37
|
);
|
|
38
38
|
case "cylinder":
|
|
39
|
-
return new
|
|
39
|
+
return new h.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 h.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 h.BufferGeometry();
|
|
48
48
|
}
|
|
49
49
|
}
|
|
50
50
|
function be({
|
|
@@ -52,18 +52,18 @@ function be({
|
|
|
52
52
|
collider: n,
|
|
53
53
|
children: r
|
|
54
54
|
}) {
|
|
55
|
-
var
|
|
56
|
-
const s = ((
|
|
55
|
+
var f, l;
|
|
56
|
+
const s = ((f = n.pose) == null ? void 0 : f.position) ?? [0, 0, 0], o = ((l = n.pose) == null ? void 0 : l.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 h.Vector3(
|
|
62
62
|
s[0],
|
|
63
63
|
s[1],
|
|
64
64
|
s[2]
|
|
65
65
|
).divideScalar(1e3),
|
|
66
|
-
rotation: new
|
|
66
|
+
rotation: new h.Euler(o[0], o[1], o[2], "XYZ"),
|
|
67
67
|
geometry: we(n.shape),
|
|
68
68
|
children: r
|
|
69
69
|
}
|
|
@@ -75,12 +75,12 @@ function Me({
|
|
|
75
75
|
meshChildrenProvider: r,
|
|
76
76
|
...s
|
|
77
77
|
}) {
|
|
78
|
-
return /* @__PURE__ */ t.jsx("group", { name: e, ...s, children: Object.entries(n).map(([o,
|
|
78
|
+
return /* @__PURE__ */ t.jsx("group", { name: e, ...s, children: Object.entries(n).map(([o, f]) => /* @__PURE__ */ t.jsx(
|
|
79
79
|
be,
|
|
80
80
|
{
|
|
81
81
|
name: o,
|
|
82
|
-
collider:
|
|
83
|
-
children: r(o,
|
|
82
|
+
collider: f,
|
|
83
|
+
children: r(o, f)
|
|
84
84
|
},
|
|
85
85
|
o
|
|
86
86
|
)) });
|
|
@@ -175,10 +175,10 @@ function ve({ positions: e = [2, 0, 2, 0, 2, 0, 2, 0] }) {
|
|
|
175
175
|
function Re(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 h.Vector3(e[0].x, e[0].y, e[0].z), r = new h.Vector3(e[1].x, e[1].y, e[1].z), s = new h.Vector3(e[2].x, e[2].y, e[2].z), o = new h.Vector3().subVectors(r, n), f = new h.Vector3().subVectors(s, n), l = new h.Vector3().crossVectors(o, f).normalize();
|
|
179
179
|
for (let a = 3; a < e.length; a++) {
|
|
180
|
-
const p = new
|
|
181
|
-
if (Math.abs(
|
|
180
|
+
const p = new h.Vector3(e[a].x, e[a].y, e[a].z), d = new h.Vector3().subVectors(p, n), u = l.dot(d);
|
|
181
|
+
if (Math.abs(u) > 1e-6)
|
|
182
182
|
return console.log("Vertices are not on the same plane"), { isCoplanar: !1 };
|
|
183
183
|
}
|
|
184
184
|
return { isCoplanar: !0, normal: l };
|
|
@@ -189,25 +189,25 @@ function Ze({
|
|
|
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((
|
|
193
|
-
if (!
|
|
194
|
-
const a =
|
|
195
|
-
(
|
|
192
|
+
return r.geometry && (r.geometry.compound ? o = r.geometry.compound.child_geometries : r.geometry.convex_hull && (o = [r.geometry])), o.map((f, l) => {
|
|
193
|
+
if (!f.convex_hull) return null;
|
|
194
|
+
const a = f.convex_hull.vertices.map(
|
|
195
|
+
(u) => new h.Vector3(u.x / 1e3, u.y / 1e3, u.z / 1e3)
|
|
196
196
|
), p = Re(a);
|
|
197
197
|
if (p.isCoplanar && p.normal) {
|
|
198
|
-
const i = new
|
|
198
|
+
const i = new h.Vector3().addVectors(
|
|
199
199
|
a[0],
|
|
200
200
|
p.normal.multiplyScalar(1e-4)
|
|
201
201
|
);
|
|
202
202
|
a.push(i);
|
|
203
203
|
}
|
|
204
|
-
let
|
|
204
|
+
let d;
|
|
205
205
|
try {
|
|
206
|
-
|
|
207
|
-
} catch (
|
|
208
|
-
return console.log("Error creating ConvexGeometry:",
|
|
206
|
+
d = new X(a);
|
|
207
|
+
} catch (u) {
|
|
208
|
+
return console.log("Error creating ConvexGeometry:", u), 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",
|
|
@@ -229,7 +229,7 @@ function Qe({
|
|
|
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 h.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
|
|
@@ -286,8 +286,8 @@ function re({
|
|
|
286
286
|
onRotationChanged: r,
|
|
287
287
|
children: s
|
|
288
288
|
}) {
|
|
289
|
-
const o =
|
|
290
|
-
|
|
289
|
+
const o = _([]), f = _([]), l = _(null), { invalidate: a } = ae();
|
|
290
|
+
F(() => {
|
|
291
291
|
const i = e.joint_position.filter(
|
|
292
292
|
(c) => c !== void 0
|
|
293
293
|
);
|
|
@@ -304,66 +304,70 @@ function re({
|
|
|
304
304
|
}, []), le((i, c) => {
|
|
305
305
|
if (l.current) {
|
|
306
306
|
const m = l.current.update(c);
|
|
307
|
-
|
|
307
|
+
d(), m || a();
|
|
308
308
|
}
|
|
309
309
|
});
|
|
310
310
|
function p(i) {
|
|
311
|
-
i && (
|
|
311
|
+
i && (f.current = _e(i), d(), a());
|
|
312
312
|
}
|
|
313
|
-
function
|
|
314
|
-
var c;
|
|
315
|
-
o.current = i, (c = l.current) == null || c.setTarget(i);
|
|
316
|
-
}
|
|
317
|
-
function f() {
|
|
313
|
+
function d() {
|
|
318
314
|
var c;
|
|
319
315
|
const i = ((c = l.current) == null ? void 0 : c.getCurrentValues()) || [];
|
|
320
316
|
if (r)
|
|
321
|
-
r(
|
|
317
|
+
r(f.current, i);
|
|
322
318
|
else
|
|
323
|
-
for (const [m, x] of
|
|
319
|
+
for (const [m, x] of f.current.entries()) {
|
|
324
320
|
const g = n[m], b = g.theta || 0, M = g.reverse_rotation_direction ? -1 : 1;
|
|
325
321
|
x.rotation.y = M * (i[m] || 0) + b;
|
|
326
322
|
}
|
|
327
323
|
}
|
|
328
|
-
|
|
324
|
+
const u = R(() => {
|
|
329
325
|
const i = e.joint_position.filter(
|
|
330
326
|
(c) => c !== void 0
|
|
331
327
|
);
|
|
332
|
-
requestAnimationFrame(() =>
|
|
328
|
+
requestAnimationFrame(() => {
|
|
329
|
+
var c;
|
|
330
|
+
o.current = i, (c = l.current) == null || c.setTarget(i);
|
|
331
|
+
});
|
|
332
|
+
}, [e]);
|
|
333
|
+
return F(() => {
|
|
334
|
+
u();
|
|
335
|
+
}, [e, u]), ye(() => {
|
|
336
|
+
u();
|
|
333
337
|
}), /* @__PURE__ */ t.jsx("group", { ref: p, children: s });
|
|
334
338
|
}
|
|
335
|
-
const
|
|
339
|
+
const Ve = "line", Fe = "mesh";
|
|
336
340
|
function Ie({
|
|
337
341
|
rapidlyChangingMotionState: e,
|
|
338
342
|
dhParameters: n,
|
|
339
343
|
...r
|
|
340
344
|
}) {
|
|
341
|
-
const s = new G(), o =
|
|
345
|
+
const s = new G(), o = _([]), f = _([]);
|
|
342
346
|
me.useEffect(() => {
|
|
343
|
-
o.current = new Array(n.length).fill(null),
|
|
347
|
+
o.current = new Array(n.length).fill(null), f.current = new Array(n.length).fill(null);
|
|
344
348
|
}, [n.length]);
|
|
345
|
-
function l(
|
|
349
|
+
function l(d, u) {
|
|
346
350
|
const i = new L(), c = new ie(), m = new L();
|
|
347
351
|
s.decompose(i, c, m);
|
|
348
352
|
const x = i.clone(), g = new G().makeRotationY(
|
|
349
|
-
|
|
350
|
-
).multiply(new G().makeTranslation(0,
|
|
353
|
+
d.theta + u * (d.reverse_rotation_direction ? -1 : 1)
|
|
354
|
+
).multiply(new G().makeTranslation(0, d.d / 1e3, 0)).multiply(new G().makeTranslation(d.a / 1e3, 0, 0)).multiply(new G().makeRotationX(d.alpha));
|
|
351
355
|
return s.multiply(g), s.decompose(i, c, m), { a: x, b: i };
|
|
352
356
|
}
|
|
353
|
-
function a(
|
|
357
|
+
function a(d, u, i, c) {
|
|
354
358
|
if (!n)
|
|
355
359
|
return;
|
|
356
|
-
const m = n[
|
|
360
|
+
const m = n[d];
|
|
357
361
|
if (!m)
|
|
358
362
|
return;
|
|
359
363
|
const { a: x, b: g } = l(m, c);
|
|
360
|
-
|
|
364
|
+
u.geometry.setPositions([x.toArray(), g.toArray()].flat()), i.position.set(g.x, g.y, g.z);
|
|
361
365
|
}
|
|
362
|
-
function p(
|
|
366
|
+
function p(d, u) {
|
|
363
367
|
s.identity();
|
|
364
|
-
for (let i = 0; i < Math.min(
|
|
365
|
-
const c = o.current[i], m =
|
|
366
|
-
c && m && a(i, c, m,
|
|
368
|
+
for (let i = 0; i < Math.min(d.length, u.length); i++) {
|
|
369
|
+
const c = o.current[i], m = f.current[i];
|
|
370
|
+
c && m && a(i, c, m, u[i]);
|
|
367
371
|
}
|
|
368
372
|
}
|
|
369
373
|
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsx(
|
|
@@ -377,19 +381,19 @@ function Ie({
|
|
|
377
381
|
/* @__PURE__ */ t.jsx("sphereGeometry", { args: [0.01, 32, 32] }),
|
|
378
382
|
/* @__PURE__ */ t.jsx("meshStandardMaterial", { color: "black", depthTest: !0 })
|
|
379
383
|
] }),
|
|
380
|
-
n.map((
|
|
384
|
+
n.map((d, u) => {
|
|
381
385
|
const { a: i, b: c } = l(
|
|
382
|
-
|
|
383
|
-
e.joint_position[
|
|
384
|
-
), m = `dhrobot_J0${
|
|
386
|
+
d,
|
|
387
|
+
e.joint_position[u] ?? 0
|
|
388
|
+
), m = `dhrobot_J0${u}`;
|
|
385
389
|
return /* @__PURE__ */ t.jsxs("group", { name: m, children: [
|
|
386
390
|
/* @__PURE__ */ t.jsx(
|
|
387
391
|
Z,
|
|
388
392
|
{
|
|
389
393
|
ref: (x) => {
|
|
390
|
-
o.current[
|
|
394
|
+
o.current[u] = x;
|
|
391
395
|
},
|
|
392
|
-
name:
|
|
396
|
+
name: Ve,
|
|
393
397
|
points: [i, c],
|
|
394
398
|
color: "white",
|
|
395
399
|
lineWidth: 5
|
|
@@ -399,7 +403,7 @@ function Ie({
|
|
|
399
403
|
"mesh",
|
|
400
404
|
{
|
|
401
405
|
ref: (x) => {
|
|
402
|
-
|
|
406
|
+
f.current[u] = x;
|
|
403
407
|
},
|
|
404
408
|
name: Fe,
|
|
405
409
|
position: c,
|
|
@@ -408,7 +412,7 @@ function Ie({
|
|
|
408
412
|
/* @__PURE__ */ t.jsx("meshStandardMaterial", { color: "black", depthTest: !0 })
|
|
409
413
|
]
|
|
410
414
|
},
|
|
411
|
-
"mesh_" +
|
|
415
|
+
"mesh_" + u
|
|
412
416
|
)
|
|
413
417
|
] }, m);
|
|
414
418
|
})
|
|
@@ -416,11 +420,11 @@ function Ie({
|
|
|
416
420
|
}
|
|
417
421
|
) });
|
|
418
422
|
}
|
|
419
|
-
const
|
|
420
|
-
function
|
|
421
|
-
return
|
|
423
|
+
const Ce = console.warn;
|
|
424
|
+
function Se() {
|
|
425
|
+
return F(() => {
|
|
422
426
|
console.warn = (e) => {
|
|
423
|
-
e !== "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" &&
|
|
427
|
+
e !== "Cannot call the manual advancement of rafz whilst frameLoop is not set as demand" && Ce(e);
|
|
424
428
|
};
|
|
425
429
|
}, []), /* @__PURE__ */ t.jsx(t.Fragment, {});
|
|
426
430
|
}
|
|
@@ -436,7 +440,7 @@ function Te({
|
|
|
436
440
|
const { gltf: o } = Ge(
|
|
437
441
|
ue(e),
|
|
438
442
|
e.split("/").pop() || e
|
|
439
|
-
),
|
|
443
|
+
), f = R(
|
|
440
444
|
(a) => {
|
|
441
445
|
a && r && r();
|
|
442
446
|
},
|
|
@@ -465,21 +469,21 @@ function Te({
|
|
|
465
469
|
a.uuid
|
|
466
470
|
);
|
|
467
471
|
}
|
|
468
|
-
return /* @__PURE__ */ t.jsx("group", { ...s, dispose: null, ref:
|
|
472
|
+
return /* @__PURE__ */ t.jsx("group", { ...s, dispose: null, ref: f, children: l(o.scene) });
|
|
469
473
|
}
|
|
470
474
|
const Ae = (e, n) => {
|
|
471
475
|
e.userData.isGhost || (e.traverse((r) => {
|
|
472
|
-
if (r instanceof
|
|
473
|
-
r.material instanceof
|
|
476
|
+
if (r instanceof h.Mesh) {
|
|
477
|
+
r.material instanceof h.Material && (r.material.colorWrite = !1);
|
|
474
478
|
const s = r.clone(), o = r.clone();
|
|
475
|
-
s.material = new
|
|
479
|
+
s.material = new h.MeshStandardMaterial({
|
|
476
480
|
depthTest: !0,
|
|
477
481
|
depthWrite: !0,
|
|
478
482
|
colorWrite: !1,
|
|
479
483
|
polygonOffset: !0,
|
|
480
484
|
polygonOffsetFactor: -1,
|
|
481
|
-
side:
|
|
482
|
-
}), s.userData.isGhost = !0, o.material = new
|
|
485
|
+
side: h.DoubleSide
|
|
486
|
+
}), s.userData.isGhost = !0, o.material = new h.MeshStandardMaterial({
|
|
483
487
|
color: n,
|
|
484
488
|
opacity: 0.3,
|
|
485
489
|
depthTest: !0,
|
|
@@ -487,7 +491,7 @@ const Ae = (e, n) => {
|
|
|
487
491
|
transparent: !0,
|
|
488
492
|
polygonOffset: !0,
|
|
489
493
|
polygonOffsetFactor: -2,
|
|
490
|
-
side:
|
|
494
|
+
side: h.DoubleSide
|
|
491
495
|
}), o.userData.isGhost = !0, r.parent && (r.parent.add(s), r.parent.add(o));
|
|
492
496
|
}
|
|
493
497
|
}), e.userData.isGhost = !0);
|
|
@@ -496,7 +500,7 @@ const Ae = (e, n) => {
|
|
|
496
500
|
const n = [];
|
|
497
501
|
e.traverse((r) => {
|
|
498
502
|
var s;
|
|
499
|
-
r instanceof
|
|
503
|
+
r instanceof h.Mesh && ((s = r.userData) != null && s.isGhost ? n.push(r) : r.material instanceof h.Material && (r.material.colorWrite = !0));
|
|
500
504
|
}), n.forEach((r) => {
|
|
501
505
|
r.parent && r.parent.remove(r);
|
|
502
506
|
}), e.userData.isGhost = !1;
|
|
@@ -507,14 +511,14 @@ const Ae = (e, n) => {
|
|
|
507
511
|
dhParameters: r,
|
|
508
512
|
getModel: s = Q,
|
|
509
513
|
flangeRef: o,
|
|
510
|
-
postModelRender:
|
|
514
|
+
postModelRender: f,
|
|
511
515
|
transparentColor: l,
|
|
512
516
|
...a
|
|
513
517
|
}) => {
|
|
514
|
-
const [p,
|
|
515
|
-
|
|
518
|
+
const [p, d] = V(null), u = R((c) => {
|
|
519
|
+
d(c);
|
|
516
520
|
}, []);
|
|
517
|
-
|
|
521
|
+
F(() => {
|
|
518
522
|
p && (l ? Ae(p, l) : ke(p));
|
|
519
523
|
}, [p, l]);
|
|
520
524
|
const i = /* @__PURE__ */ t.jsx(
|
|
@@ -533,7 +537,7 @@ const Ae = (e, n) => {
|
|
|
533
537
|
console.error(c);
|
|
534
538
|
},
|
|
535
539
|
children: [
|
|
536
|
-
/* @__PURE__ */ t.jsx(pe, { fallback: i, children: /* @__PURE__ */ t.jsx("group", { ref:
|
|
540
|
+
/* @__PURE__ */ t.jsx(pe, { fallback: i, children: /* @__PURE__ */ t.jsx("group", { ref: u, children: /* @__PURE__ */ t.jsx(
|
|
537
541
|
re,
|
|
538
542
|
{
|
|
539
543
|
rapidlyChangingMotionState: e,
|
|
@@ -542,14 +546,14 @@ const Ae = (e, n) => {
|
|
|
542
546
|
Te,
|
|
543
547
|
{
|
|
544
548
|
modelURL: s(n),
|
|
545
|
-
postModelRender:
|
|
549
|
+
postModelRender: f,
|
|
546
550
|
flangeRef: o,
|
|
547
551
|
...a
|
|
548
552
|
}
|
|
549
553
|
)
|
|
550
554
|
}
|
|
551
555
|
) }) }),
|
|
552
|
-
/* @__PURE__ */ t.jsx(
|
|
556
|
+
/* @__PURE__ */ t.jsx(Se, {})
|
|
553
557
|
]
|
|
554
558
|
}
|
|
555
559
|
);
|
|
@@ -561,7 +565,7 @@ function Pe({
|
|
|
561
565
|
flangeRef: r,
|
|
562
566
|
transparentColor: s,
|
|
563
567
|
postModelRender: o,
|
|
564
|
-
...
|
|
568
|
+
...f
|
|
565
569
|
}) {
|
|
566
570
|
return e.dhParameters ? /* @__PURE__ */ t.jsx(
|
|
567
571
|
ze,
|
|
@@ -573,7 +577,7 @@ function Pe({
|
|
|
573
577
|
flangeRef: r,
|
|
574
578
|
transparentColor: s,
|
|
575
579
|
postModelRender: o,
|
|
576
|
-
...
|
|
580
|
+
...f
|
|
577
581
|
}
|
|
578
582
|
) : null;
|
|
579
583
|
}
|
|
@@ -585,42 +589,42 @@ const et = q(
|
|
|
585
589
|
safetyState: r,
|
|
586
590
|
operationMode: s,
|
|
587
591
|
driveToHomeEnabled: o = !1,
|
|
588
|
-
onDriveToHomePress:
|
|
592
|
+
onDriveToHomePress: f,
|
|
589
593
|
onDriveToHomeRelease: l,
|
|
590
594
|
connectedMotionGroup: a,
|
|
591
595
|
robotComponent: p = Pe,
|
|
592
|
-
customContentComponent:
|
|
593
|
-
className:
|
|
596
|
+
customContentComponent: d,
|
|
597
|
+
className: u
|
|
594
598
|
}) => {
|
|
595
599
|
var z;
|
|
596
|
-
const i = fe(), { t: c } = xe(), [m, x] =
|
|
597
|
-
|
|
598
|
-
const
|
|
600
|
+
const i = fe(), { t: c } = xe(), [m, x] = V(!1), g = _(null), b = _(null), [M, ne] = V(!1), [I, oe] = V({ width: 400, height: 600 }), [Ee, se] = V(0);
|
|
601
|
+
F(() => {
|
|
602
|
+
const T = () => {
|
|
599
603
|
if (b.current) {
|
|
600
604
|
const { offsetWidth: O, offsetHeight: E } = b.current;
|
|
601
605
|
ne(O > E), oe({ width: O, height: E });
|
|
602
606
|
}
|
|
603
607
|
};
|
|
604
|
-
|
|
605
|
-
const P = new ResizeObserver(
|
|
608
|
+
T();
|
|
609
|
+
const P = new ResizeObserver(T);
|
|
606
610
|
return b.current && P.observe(b.current), () => {
|
|
607
611
|
P.disconnect();
|
|
608
612
|
};
|
|
609
613
|
}, []);
|
|
610
|
-
const A =
|
|
611
|
-
se((
|
|
612
|
-
}, []),
|
|
613
|
-
!o || !
|
|
614
|
-
}, [o,
|
|
614
|
+
const A = R(() => {
|
|
615
|
+
se((T) => T + 1);
|
|
616
|
+
}, []), C = R(() => {
|
|
617
|
+
!o || !f || (x(!0), f());
|
|
618
|
+
}, [o, f]), S = R(() => {
|
|
615
619
|
!o || !l || (x(!1), l());
|
|
616
|
-
}, [o, l]), k =
|
|
620
|
+
}, [o, l]), k = R(() => {
|
|
617
621
|
m && l && (x(!1), l());
|
|
618
|
-
}, [m, l]), w = M ?
|
|
622
|
+
}, [m, l]), w = M ? I.width < 350 : I.height < 200, D = M ? I.height < 310 : I.height < 450;
|
|
619
623
|
return /* @__PURE__ */ t.jsx(
|
|
620
624
|
de,
|
|
621
625
|
{
|
|
622
626
|
ref: b,
|
|
623
|
-
className:
|
|
627
|
+
className: u,
|
|
624
628
|
sx: {
|
|
625
629
|
width: "100%",
|
|
626
630
|
height: "100%",
|
|
@@ -712,7 +716,7 @@ const et = q(
|
|
|
712
716
|
children: [
|
|
713
717
|
/* @__PURE__ */ t.jsx(B, { variant: "h6", component: "h2", sx: { mb: 1 }, children: e }),
|
|
714
718
|
/* @__PURE__ */ t.jsx(
|
|
715
|
-
|
|
719
|
+
U,
|
|
716
720
|
{
|
|
717
721
|
programState: n,
|
|
718
722
|
safetyState: r,
|
|
@@ -734,8 +738,8 @@ const et = q(
|
|
|
734
738
|
justifyContent: "space-between"
|
|
735
739
|
},
|
|
736
740
|
children: [
|
|
737
|
-
!
|
|
738
|
-
/* @__PURE__ */ t.jsx(
|
|
741
|
+
!D && d && /* @__PURE__ */ t.jsxs(y, { children: [
|
|
742
|
+
/* @__PURE__ */ t.jsx(d, {}),
|
|
739
743
|
/* @__PURE__ */ t.jsx(
|
|
740
744
|
H,
|
|
741
745
|
{
|
|
@@ -752,7 +756,7 @@ const et = q(
|
|
|
752
756
|
y,
|
|
753
757
|
{
|
|
754
758
|
sx: {
|
|
755
|
-
mt: !
|
|
759
|
+
mt: !D && d ? "auto" : 0
|
|
756
760
|
},
|
|
757
761
|
children: /* @__PURE__ */ t.jsx(
|
|
758
762
|
y,
|
|
@@ -764,17 +768,17 @@ const et = q(
|
|
|
764
768
|
mb: { xs: 0.5, sm: 0.75, md: 1 }
|
|
765
769
|
},
|
|
766
770
|
children: /* @__PURE__ */ t.jsx(
|
|
767
|
-
|
|
771
|
+
J,
|
|
768
772
|
{
|
|
769
773
|
ref: g,
|
|
770
774
|
variant: "contained",
|
|
771
775
|
color: "secondary",
|
|
772
776
|
size: "small",
|
|
773
777
|
disabled: !o,
|
|
774
|
-
onMouseDown:
|
|
778
|
+
onMouseDown: C,
|
|
775
779
|
onMouseUp: S,
|
|
776
780
|
onMouseLeave: k,
|
|
777
|
-
onTouchStart:
|
|
781
|
+
onTouchStart: C,
|
|
778
782
|
onTouchEnd: S,
|
|
779
783
|
sx: {
|
|
780
784
|
textTransform: "none",
|
|
@@ -807,7 +811,7 @@ const et = q(
|
|
|
807
811
|
/* @__PURE__ */ t.jsxs(y, { children: [
|
|
808
812
|
/* @__PURE__ */ t.jsx(B, { variant: "h6", component: "h2", sx: { mb: 1 }, children: e }),
|
|
809
813
|
/* @__PURE__ */ t.jsx(
|
|
810
|
-
|
|
814
|
+
U,
|
|
811
815
|
{
|
|
812
816
|
programState: n,
|
|
813
817
|
safetyState: r,
|
|
@@ -861,8 +865,8 @@ const et = q(
|
|
|
861
865
|
}
|
|
862
866
|
),
|
|
863
867
|
/* @__PURE__ */ t.jsxs(y, { children: [
|
|
864
|
-
!
|
|
865
|
-
/* @__PURE__ */ t.jsx(
|
|
868
|
+
!D && d && /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
869
|
+
/* @__PURE__ */ t.jsx(d, {}),
|
|
866
870
|
/* @__PURE__ */ t.jsx(
|
|
867
871
|
H,
|
|
868
872
|
{
|
|
@@ -881,21 +885,21 @@ const et = q(
|
|
|
881
885
|
sx: {
|
|
882
886
|
display: "flex",
|
|
883
887
|
justifyContent: "flex-start",
|
|
884
|
-
mt: !
|
|
888
|
+
mt: !D && d ? { xs: 1, sm: 2, md: 5 } : { xs: 0.5, sm: 1, md: 2 },
|
|
885
889
|
mb: { xs: 0.5, sm: 0.75, md: 1 }
|
|
886
890
|
},
|
|
887
891
|
children: /* @__PURE__ */ t.jsx(
|
|
888
|
-
|
|
892
|
+
J,
|
|
889
893
|
{
|
|
890
894
|
ref: g,
|
|
891
895
|
variant: "contained",
|
|
892
896
|
color: "secondary",
|
|
893
897
|
size: "small",
|
|
894
898
|
disabled: !o,
|
|
895
|
-
onMouseDown:
|
|
899
|
+
onMouseDown: C,
|
|
896
900
|
onMouseUp: S,
|
|
897
901
|
onMouseLeave: k,
|
|
898
|
-
onTouchStart:
|
|
902
|
+
onTouchStart: C,
|
|
899
903
|
onTouchEnd: S,
|
|
900
904
|
sx: {
|
|
901
905
|
textTransform: "none",
|
|
@@ -973,4 +977,4 @@ export {
|
|
|
973
977
|
Oe as e,
|
|
974
978
|
rt as g
|
|
975
979
|
};
|
|
976
|
-
//# sourceMappingURL=manufacturerHomePositions-
|
|
980
|
+
//# sourceMappingURL=manufacturerHomePositions-BW0KbWeg.js.map
|