@wandelbots/wandelbots-js-react-components 1.17.2 → 1.17.4
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/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointLimitDetector.d.ts +1 -1
- package/dist/components/jogging/JoggingJointLimitDetector.d.ts.map +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts +1 -1
- package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
- package/dist/components/jogging/JoggingVelocitySlider.d.ts.map +1 -1
- package/dist/components/robots/ABB_1200_07_7.d.ts +7 -2
- package/dist/components/robots/ABB_1200_07_7.d.ts.map +1 -1
- package/dist/components/robots/DHRobot.d.ts.map +1 -1
- package/dist/components/robots/FANUC_ARC_Mate_100iD.d.ts +7 -2
- package/dist/components/robots/FANUC_ARC_Mate_100iD.d.ts.map +1 -1
- package/dist/components/robots/FANUC_ARC_Mate_120iD.d.ts +7 -2
- package/dist/components/robots/FANUC_ARC_Mate_120iD.d.ts.map +1 -1
- package/dist/components/robots/FANUC_CRX10iA.d.ts +7 -2
- package/dist/components/robots/FANUC_CRX10iA.d.ts.map +1 -1
- package/dist/components/robots/FANUC_CRX20iAL.d.ts +7 -2
- package/dist/components/robots/FANUC_CRX20iAL.d.ts.map +1 -1
- package/dist/components/robots/FANUC_CRX25iA.d.ts +7 -2
- package/dist/components/robots/FANUC_CRX25iA.d.ts.map +1 -1
- package/dist/components/robots/FANUC_CRX25iAL.d.ts +7 -2
- package/dist/components/robots/FANUC_CRX25iAL.d.ts.map +1 -1
- package/dist/components/robots/KUKA_KR16_R2010_2.d.ts +7 -2
- package/dist/components/robots/KUKA_KR16_R2010_2.d.ts.map +1 -1
- package/dist/components/robots/KUKA_KR210_R2700.d.ts +7 -2
- package/dist/components/robots/KUKA_KR210_R2700.d.ts.map +1 -1
- package/dist/components/robots/KUKA_KR270_R2700.d.ts +7 -2
- package/dist/components/robots/KUKA_KR270_R2700.d.ts.map +1 -1
- package/dist/components/robots/Robot.d.ts +3 -3
- package/dist/components/robots/Robot.d.ts.map +1 -1
- package/dist/components/robots/RobotAnimator.d.ts +7 -4
- package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
- package/dist/components/robots/SupportedRobot.d.ts +1 -5
- package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
- package/dist/components/robots/UniversalRobots_UR10.d.ts +2 -2
- package/dist/components/robots/UniversalRobots_UR10.d.ts.map +1 -1
- package/dist/components/robots/UniversalRobots_UR10e.d.ts +2 -2
- package/dist/components/robots/UniversalRobots_UR10e.d.ts.map +1 -1
- package/dist/components/robots/UniversalRobots_UR3.d.ts +2 -2
- package/dist/components/robots/UniversalRobots_UR3.d.ts.map +1 -1
- package/dist/components/robots/UniversalRobots_UR3e.d.ts +2 -2
- package/dist/components/robots/UniversalRobots_UR3e.d.ts.map +1 -1
- package/dist/components/robots/UniversalRobots_UR5.d.ts +2 -2
- package/dist/components/robots/UniversalRobots_UR5.d.ts.map +1 -1
- package/dist/components/robots/UniversalRobots_UR5e.d.ts +2 -2
- package/dist/components/robots/UniversalRobots_UR5e.d.ts.map +1 -1
- package/dist/components/robots/Yaskawa_AR1440.d.ts +8 -2
- package/dist/components/robots/Yaskawa_AR1440.d.ts.map +1 -1
- package/dist/components/robots/Yaskawa_AR1730.d.ts +8 -2
- package/dist/components/robots/Yaskawa_AR1730.d.ts.map +1 -1
- package/dist/components/robots/Yaskawa_AR2010.d.ts +8 -2
- package/dist/components/robots/Yaskawa_AR2010.d.ts.map +1 -1
- package/dist/components/robots/Yaskawa_AR3120.d.ts +8 -2
- package/dist/components/robots/Yaskawa_AR3120.d.ts.map +1 -1
- package/dist/components/robots/Yaskawa_AR900.d.ts +7 -2
- package/dist/components/robots/Yaskawa_AR900.d.ts.map +1 -1
- package/dist/components/robots/Yaskawa_GP50.d.ts +7 -2
- package/dist/components/robots/Yaskawa_GP50.d.ts.map +1 -1
- package/dist/components/robots/types.d.ts +17 -0
- package/dist/components/robots/types.d.ts.map +1 -0
- package/dist/i18n/config.d.ts.map +1 -1
- package/dist/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9706 -10063
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/jogging/JoggingCartesianTab.tsx +11 -11
- package/src/components/jogging/JoggingJointLimitDetector.tsx +9 -8
- package/src/components/jogging/JoggingPanel.tsx +8 -10
- package/src/components/jogging/JoggingVelocitySlider.tsx +4 -5
- package/src/components/robots/ABB_1200_07_7.tsx +7 -22
- package/src/components/robots/DHRobot.tsx +34 -33
- package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +7 -22
- package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +7 -22
- package/src/components/robots/FANUC_CRX10iA.tsx +7 -22
- package/src/components/robots/FANUC_CRX20iAL.tsx +7 -22
- package/src/components/robots/FANUC_CRX25iA.tsx +7 -22
- package/src/components/robots/FANUC_CRX25iAL.tsx +7 -22
- package/src/components/robots/KUKA_KR16_R2010_2.tsx +19 -34
- package/src/components/robots/KUKA_KR210_R2700.tsx +7 -23
- package/src/components/robots/KUKA_KR270_R2700.tsx +7 -23
- package/src/components/robots/Robot.tsx +3 -3
- package/src/components/robots/RobotAnimator.tsx +32 -21
- package/src/components/robots/SupportedRobot.tsx +93 -103
- package/src/components/robots/UniversalRobots_UR10.tsx +3 -20
- package/src/components/robots/UniversalRobots_UR10e.tsx +2 -19
- package/src/components/robots/UniversalRobots_UR3.tsx +2 -19
- package/src/components/robots/UniversalRobots_UR3e.tsx +3 -20
- package/src/components/robots/UniversalRobots_UR5.tsx +3 -20
- package/src/components/robots/UniversalRobots_UR5e.tsx +3 -20
- package/src/components/robots/Yaskawa_AR1440.tsx +8 -24
- package/src/components/robots/Yaskawa_AR1730.tsx +8 -24
- package/src/components/robots/Yaskawa_AR2010.tsx +8 -24
- package/src/components/robots/Yaskawa_AR3120.tsx +8 -24
- package/src/components/robots/Yaskawa_AR900.tsx +7 -22
- package/src/components/robots/Yaskawa_GP50.tsx +7 -24
- package/src/components/robots/types.ts +19 -0
- package/src/i18n/config.ts +15 -19
- package/src/i18n/locales/de/translations.json +2 -1
- package/src/i18n/locales/en/translations.json +2 -1
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
import { animated } from "@react-spring/three"
|
|
2
2
|
import { useGLTF } from "@react-three/drei"
|
|
3
|
-
import type {
|
|
4
|
-
import RobotAnimator from "./RobotAnimator"
|
|
5
|
-
import type * as THREE from "three"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
export function UniversalRobots_UR10e({
|
|
8
|
-
modelURL,
|
|
9
|
-
rapidlyChangingMotionState,
|
|
10
|
-
...props
|
|
11
|
-
}: RobotProps) {
|
|
5
|
+
export function UniversalRobots_UR10e({ modelURL, ...props }: RobotModelProps) {
|
|
12
6
|
const gltf = useGLTF(modelURL) as any
|
|
13
7
|
const nodes = gltf.nodes
|
|
14
8
|
const materials = gltf.materials
|
|
15
9
|
|
|
16
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
17
|
-
jointObjects.forEach(
|
|
18
|
-
(object, index) => (object.rotation.y = jointValues[index]!),
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
return (
|
|
23
11
|
<>
|
|
24
|
-
<RobotAnimator
|
|
25
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
|
-
robotRootObjectName="Scene"
|
|
27
|
-
onRotationChanged={setRotation}
|
|
28
|
-
/>
|
|
29
12
|
<group {...props} dispose={null}>
|
|
30
13
|
<group name="Scene">
|
|
31
14
|
<group name="UR10e" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,31 +1,14 @@
|
|
|
1
1
|
import { animated } from "@react-spring/three"
|
|
2
2
|
import { useGLTF } from "@react-three/drei"
|
|
3
|
-
import type
|
|
4
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
5
|
-
import RobotAnimator from "./RobotAnimator"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
export function UniversalRobots_UR3({
|
|
8
|
-
modelURL,
|
|
9
|
-
rapidlyChangingMotionState,
|
|
10
|
-
...props
|
|
11
|
-
}: RobotProps) {
|
|
5
|
+
export function UniversalRobots_UR3({ modelURL, ...props }: RobotModelProps) {
|
|
12
6
|
const gltf = useGLTF(modelURL) as any
|
|
13
7
|
const nodes = gltf.nodes
|
|
14
8
|
const materials = gltf.materials
|
|
15
9
|
|
|
16
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
17
|
-
jointObjects.forEach(
|
|
18
|
-
(object, index) => (object.rotation.y = jointValues[index]!),
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
return (
|
|
23
11
|
<>
|
|
24
|
-
<RobotAnimator
|
|
25
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
|
-
robotRootObjectName="Scene"
|
|
27
|
-
onRotationChanged={setRotation}
|
|
28
|
-
/>
|
|
29
12
|
<group {...props} dispose={null}>
|
|
30
13
|
<group name="Scene">
|
|
31
14
|
<group name="UR3" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
1
|
import { animated } from "@react-spring/three"
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
export function UniversalRobots_UR3e({
|
|
8
|
-
modelURL,
|
|
9
|
-
rapidlyChangingMotionState,
|
|
10
|
-
...props
|
|
11
|
-
}: RobotProps) {
|
|
5
|
+
export function UniversalRobots_UR3e({ modelURL, ...props }: RobotModelProps) {
|
|
12
6
|
const gltf = useGLTF(modelURL) as any
|
|
13
7
|
const nodes = gltf.nodes
|
|
14
8
|
const materials = gltf.materials
|
|
15
9
|
|
|
16
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
17
|
-
jointObjects.forEach(
|
|
18
|
-
(object, index) => (object.rotation.y = jointValues[index]!),
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
return (
|
|
23
11
|
<>
|
|
24
|
-
<RobotAnimator
|
|
25
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
|
-
robotRootObjectName="Scene"
|
|
27
|
-
onRotationChanged={setRotation}
|
|
28
|
-
/>
|
|
29
12
|
<group {...props} dispose={null}>
|
|
30
13
|
<group name="Scene">
|
|
31
14
|
<animated.group name="UR3e" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
1
|
import { animated } from "@react-spring/three"
|
|
4
|
-
import
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
export function UniversalRobots_UR5({
|
|
8
|
-
modelURL,
|
|
9
|
-
rapidlyChangingMotionState,
|
|
10
|
-
...props
|
|
11
|
-
}: RobotProps) {
|
|
5
|
+
export function UniversalRobots_UR5({ modelURL, ...props }: RobotModelProps) {
|
|
12
6
|
const gltf = useGLTF(modelURL) as any
|
|
13
7
|
const nodes = gltf.nodes
|
|
14
8
|
const materials = gltf.materials
|
|
15
9
|
|
|
16
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
17
|
-
jointObjects.forEach(
|
|
18
|
-
(object, index) => (object.rotation.y = jointValues[index]!),
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
return (
|
|
23
11
|
<>
|
|
24
|
-
<RobotAnimator
|
|
25
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
|
-
robotRootObjectName="Scene"
|
|
27
|
-
onRotationChanged={setRotation}
|
|
28
|
-
/>
|
|
29
12
|
<group {...props} dispose={null}>
|
|
30
13
|
<group name="Scene">
|
|
31
14
|
<animated.group name="UNIVERSALROBOTS_UR5CB3_J00">
|
|
@@ -1,31 +1,14 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
1
|
import { animated } from "@react-spring/three"
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
export function UniversalRobots_UR5e({
|
|
8
|
-
modelURL,
|
|
9
|
-
rapidlyChangingMotionState,
|
|
10
|
-
...props
|
|
11
|
-
}: RobotProps) {
|
|
5
|
+
export function UniversalRobots_UR5e({ modelURL, ...props }: RobotModelProps) {
|
|
12
6
|
const gltf = useGLTF(modelURL) as any
|
|
13
7
|
const nodes = gltf.nodes
|
|
14
8
|
const materials = gltf.materials
|
|
15
9
|
|
|
16
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
17
|
-
jointObjects.forEach(
|
|
18
|
-
(object, index) => (object.rotation.y = jointValues[index]!),
|
|
19
|
-
)
|
|
20
|
-
}
|
|
21
|
-
|
|
22
10
|
return (
|
|
23
11
|
<>
|
|
24
|
-
<RobotAnimator
|
|
25
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
|
-
robotRootObjectName="Scene"
|
|
27
|
-
onRotationChanged={setRotation}
|
|
28
|
-
/>
|
|
29
12
|
<group {...props} dispose={null}>
|
|
30
13
|
<group name="Scene">
|
|
31
14
|
<group name="UR5e" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
1
|
import { animated } from "@react-spring/three"
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
Yaskawa_AR1440.config = {
|
|
6
|
+
rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
|
|
7
|
+
rotationSign: [1, -1, 1, 1, 1, 1],
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Yaskawa_AR1440({ modelURL, ...props }: RobotModelProps) {
|
|
12
11
|
const gltf = useGLTF(modelURL) as any
|
|
13
12
|
|
|
14
13
|
const nodes = gltf.nodes
|
|
15
14
|
const materials = gltf.materials
|
|
16
|
-
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
17
|
-
const rotationSign = [1, -1, 1, 1, 1, 1]
|
|
18
|
-
|
|
19
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
20
|
-
jointObjects.forEach(
|
|
21
|
-
(object, index) =>
|
|
22
|
-
(object.rotation.y =
|
|
23
|
-
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
15
|
|
|
27
16
|
return (
|
|
28
17
|
<>
|
|
29
|
-
<RobotAnimator
|
|
30
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
31
|
-
robotRootObjectName="Scene"
|
|
32
|
-
onRotationChanged={setRotation}
|
|
33
|
-
/>
|
|
34
18
|
<group {...props} dispose={null}>
|
|
35
19
|
<group name="Scene">
|
|
36
20
|
<group name="AR1440" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
1
|
import { animated } from "@react-spring/three"
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
Yaskawa_AR1730.config = {
|
|
6
|
+
rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
|
|
7
|
+
rotationSign: [1, -1, 1, 1, 1, 1],
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Yaskawa_AR1730({ modelURL, ...props }: RobotModelProps) {
|
|
12
11
|
const gltf = useGLTF(modelURL) as any
|
|
13
12
|
|
|
14
13
|
const nodes = gltf.nodes
|
|
15
14
|
const materials = gltf.materials
|
|
16
|
-
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
17
|
-
const rotationSign = [1, -1, 1, 1, 1, 1]
|
|
18
|
-
|
|
19
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
20
|
-
jointObjects.forEach(
|
|
21
|
-
(object, index) =>
|
|
22
|
-
(object.rotation.y =
|
|
23
|
-
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
15
|
|
|
27
16
|
return (
|
|
28
17
|
<>
|
|
29
|
-
<RobotAnimator
|
|
30
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
31
|
-
robotRootObjectName="Scene"
|
|
32
|
-
onRotationChanged={setRotation}
|
|
33
|
-
/>
|
|
34
18
|
<group {...props} dispose={null}>
|
|
35
19
|
<group name="Scene">
|
|
36
20
|
<animated.group name="AR1730_J00">
|
|
@@ -1,35 +1,19 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
1
|
import { animated } from "@react-spring/three"
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
Yaskawa_AR2010.config = {
|
|
6
|
+
rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
|
|
7
|
+
rotationSign: [1, -1, 1, 1, 1, 1],
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Yaskawa_AR2010({ modelURL, ...props }: RobotModelProps) {
|
|
12
11
|
const gltf = useGLTF(modelURL) as any
|
|
13
12
|
const nodes = gltf.nodes
|
|
14
13
|
const materials = gltf.materials
|
|
15
|
-
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
16
|
-
const rotationSign = [1, -1, 1, 1, 1, 1]
|
|
17
|
-
|
|
18
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
19
|
-
jointObjects.forEach(
|
|
20
|
-
(object, index) =>
|
|
21
|
-
(object.rotation.y =
|
|
22
|
-
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
23
|
-
)
|
|
24
|
-
}
|
|
25
14
|
|
|
26
15
|
return (
|
|
27
16
|
<>
|
|
28
|
-
<RobotAnimator
|
|
29
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
30
|
-
robotRootObjectName="Scene"
|
|
31
|
-
onRotationChanged={setRotation}
|
|
32
|
-
/>
|
|
33
17
|
<group {...props} dispose={null}>
|
|
34
18
|
<group name="Scene">
|
|
35
19
|
<group name="AR2010" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,36 +1,20 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
|
-
import RobotAnimator from "./RobotAnimator"
|
|
5
1
|
import { animated } from "@react-spring/three"
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
Yaskawa_AR3120.config = {
|
|
6
|
+
rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
|
|
7
|
+
rotationSign: [1, -1, 1, 1, 1, 1],
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
export function Yaskawa_AR3120({ modelURL, ...props }: RobotModelProps) {
|
|
12
11
|
const gltf = useGLTF(modelURL) as any
|
|
13
12
|
|
|
14
13
|
const nodes = gltf.nodes
|
|
15
14
|
const materials = gltf.materials
|
|
16
|
-
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
17
|
-
const rotationSign = [1, -1, 1, 1, 1, 1]
|
|
18
|
-
|
|
19
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
20
|
-
jointObjects.forEach(
|
|
21
|
-
(object, index) =>
|
|
22
|
-
(object.rotation.y =
|
|
23
|
-
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
15
|
|
|
27
16
|
return (
|
|
28
17
|
<>
|
|
29
|
-
<RobotAnimator
|
|
30
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
31
|
-
robotRootObjectName="Scene"
|
|
32
|
-
onRotationChanged={setRotation}
|
|
33
|
-
/>
|
|
34
18
|
<group {...props} dispose={null}>
|
|
35
19
|
<group name="Scene">
|
|
36
20
|
<animated.group name="AR3120_J00">
|
|
@@ -1,33 +1,18 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
1
|
import { animated } from "@react-spring/three"
|
|
5
|
-
import
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}:
|
|
5
|
+
Yaskawa_AR900.config = {
|
|
6
|
+
rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function Yaskawa_AR900({ modelURL, ...props }: RobotModelProps) {
|
|
12
10
|
const gltf = useGLTF(modelURL) as any
|
|
13
11
|
const nodes = gltf.nodes
|
|
14
12
|
const materials = gltf.materials
|
|
15
|
-
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
16
|
-
|
|
17
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
18
|
-
jointObjects.forEach(
|
|
19
|
-
(object, index) =>
|
|
20
|
-
(object.rotation.y = jointValues[index]! + rotationOffsets[index]!),
|
|
21
|
-
)
|
|
22
|
-
}
|
|
23
13
|
|
|
24
14
|
return (
|
|
25
15
|
<>
|
|
26
|
-
<RobotAnimator
|
|
27
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
28
|
-
robotRootObjectName="Scene"
|
|
29
|
-
onRotationChanged={setRotation}
|
|
30
|
-
/>
|
|
31
16
|
<group {...props} dispose={null}>
|
|
32
17
|
<group name="Scene">
|
|
33
18
|
<group name="AR900" rotation={[Math.PI / 2, 0, 0]}>
|
|
@@ -1,36 +1,19 @@
|
|
|
1
|
-
import { useGLTF } from "@react-three/drei"
|
|
2
|
-
import type * as THREE from "three"
|
|
3
|
-
import type { RobotProps } from "./SupportedRobot"
|
|
4
|
-
import RobotAnimator from "./RobotAnimator"
|
|
5
1
|
import { animated } from "@react-spring/three"
|
|
2
|
+
import { useGLTF } from "@react-three/drei"
|
|
3
|
+
import type { RobotModelProps } from "./types"
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
}:
|
|
5
|
+
Yaskawa_GP50.config = {
|
|
6
|
+
rotationOffsets: [0, -Math.PI / 2, 0, 0, 0, 0],
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
export function Yaskawa_GP50({ modelURL, ...props }: RobotModelProps) {
|
|
12
10
|
const gltf = useGLTF(modelURL) as any
|
|
13
11
|
|
|
14
12
|
const nodes = gltf.nodes
|
|
15
13
|
const materials = gltf.materials
|
|
16
|
-
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
17
|
-
const rotationSign = [1, 1, 1, 1, 1, 1]
|
|
18
|
-
|
|
19
|
-
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
20
|
-
jointObjects.forEach(
|
|
21
|
-
(object, index) =>
|
|
22
|
-
(object.rotation.y =
|
|
23
|
-
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
24
|
-
)
|
|
25
|
-
}
|
|
26
14
|
|
|
27
15
|
return (
|
|
28
16
|
<>
|
|
29
|
-
<RobotAnimator
|
|
30
|
-
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
31
|
-
robotRootObjectName="Scene"
|
|
32
|
-
onRotationChanged={setRotation}
|
|
33
|
-
/>
|
|
34
17
|
<group {...props} dispose={null}>
|
|
35
18
|
<group name="Scene">
|
|
36
19
|
<group name="link_0">
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import type { GroupProps } from "@react-three/fiber"
|
|
2
|
+
|
|
3
|
+
export type RobotModelProps = {
|
|
4
|
+
modelURL: string
|
|
5
|
+
} & GroupProps
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Configuration needed to render a specific robot model that
|
|
9
|
+
* isn't already handled by the gltf => tsx export
|
|
10
|
+
*/
|
|
11
|
+
export type RobotModelConfig = {
|
|
12
|
+
rotationOffsets?: number[]
|
|
13
|
+
rotationSign?: number[]
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
export type RobotModelComponent = {
|
|
17
|
+
(props: RobotModelProps): JSX.Element
|
|
18
|
+
config?: RobotModelConfig
|
|
19
|
+
}
|
package/src/i18n/config.ts
CHANGED
|
@@ -1,27 +1,23 @@
|
|
|
1
|
-
import deJSON from "./locales/de/translations.json"
|
|
2
|
-
import enJSON from "./locales/en/translations.json"
|
|
3
|
-
import i18next from "i18next"
|
|
4
1
|
import type { i18n } from "i18next"
|
|
2
|
+
import i18next from "i18next"
|
|
5
3
|
import LanguageDetector from "i18next-browser-languagedetector"
|
|
6
|
-
import
|
|
4
|
+
import deJSON from "./locales/de/translations.json"
|
|
5
|
+
import enJSON from "./locales/en/translations.json"
|
|
7
6
|
|
|
8
7
|
const i18n: i18n = i18next.createInstance()
|
|
9
8
|
|
|
10
|
-
i18n
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
},
|
|
19
|
-
de: {
|
|
20
|
-
translations: deJSON,
|
|
21
|
-
},
|
|
9
|
+
i18n.use(LanguageDetector).init({
|
|
10
|
+
supportedLngs: ["en", "de"],
|
|
11
|
+
resources: {
|
|
12
|
+
en: {
|
|
13
|
+
translations: enJSON,
|
|
14
|
+
},
|
|
15
|
+
de: {
|
|
16
|
+
translations: deJSON,
|
|
22
17
|
},
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
18
|
+
},
|
|
19
|
+
ns: ["translations"],
|
|
20
|
+
defaultNS: "translations",
|
|
21
|
+
})
|
|
26
22
|
|
|
27
23
|
export default i18n
|
|
@@ -11,5 +11,6 @@
|
|
|
11
11
|
"Jogging.Increment.Continuous.dd": "Fortlaufend",
|
|
12
12
|
"Jogging.Cartesian.Orientation.lb": "Orientierung",
|
|
13
13
|
"Jogging.Activate.bt": "Jogging activieren",
|
|
14
|
-
"Jogging.Activating.lb": "Jogging wird aktivieren"
|
|
14
|
+
"Jogging.Activating.lb": "Jogging wird aktivieren",
|
|
15
|
+
"Jogging.JointLimitsReached.lb": "Joint-Limit für Joint {{jointNumbers}} erreicht"
|
|
15
16
|
}
|
|
@@ -11,5 +11,6 @@
|
|
|
11
11
|
"Jogging.Increment.Continuous.dd": "Continuous",
|
|
12
12
|
"Jogging.Cartesian.Orientation.lb": "Orientation",
|
|
13
13
|
"Jogging.Activate.bt": "Activate jogging",
|
|
14
|
-
"Jogging.Activating.lb": "Activating jogging"
|
|
14
|
+
"Jogging.Activating.lb": "Activating jogging",
|
|
15
|
+
"Jogging.JointLimitsReached.lb": "Joint limit reached for joint {{jointNumbers}}"
|
|
15
16
|
}
|