@wandelbots/wandelbots-js-react-components 1.3.0 → 1.3.2
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/README.md +0 -29
- package/package.json +60 -43
- package/src/components/3d-viewport/CoordinateSystemTransform.tsx +44 -0
- package/src/components/3d-viewport/PresetEnvironment.tsx +78 -0
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +54 -0
- package/src/components/LoadingButton.stories.tsx +61 -0
- package/src/components/LoadingButton.tsx +19 -0
- package/src/components/LoadingCover.tsx +75 -0
- package/src/components/ThemeSelect.tsx +49 -0
- package/src/components/VelocitySlider.stories.tsx +32 -0
- package/src/components/VelocitySlider.tsx +52 -0
- package/src/components/jogging/JoggingCartesianAxisControl.stories.tsx +41 -0
- package/src/components/jogging/JoggingCartesianAxisControl.tsx +127 -0
- package/src/components/jogging/JoggingCartesianTab.tsx +265 -0
- package/src/components/jogging/JoggingCartesianValues.tsx +45 -0
- package/src/components/jogging/JoggingFreedriveTab.tsx +9 -0
- package/src/components/jogging/JoggingJointLimitDetector.tsx +51 -0
- package/src/components/jogging/JoggingJointRotationControl.stories.tsx +38 -0
- package/src/components/jogging/JoggingJointRotationControl.tsx +197 -0
- package/src/components/jogging/JoggingJointTab.tsx +93 -0
- package/src/components/jogging/JoggingJointValues.tsx +45 -0
- package/src/components/jogging/JoggingOptions.tsx +96 -0
- package/src/components/jogging/JoggingPanel.stories.tsx +26 -0
- package/src/components/jogging/JoggingPanel.tsx +148 -0
- package/src/components/jogging/JoggingStore.tsx +294 -0
- package/src/components/jogging/JoggingVelocitySlider.tsx +56 -0
- package/src/components/robots/ABB_1200_07_7.tsx +123 -0
- package/src/components/robots/AxisConfig.ts +3 -0
- package/src/components/robots/DHRobot.tsx +129 -0
- package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +187 -0
- package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +187 -0
- package/src/components/robots/FANUC_CRX10iA.tsx +167 -0
- package/src/components/robots/FANUC_CRX25iA.tsx +167 -0
- package/src/components/robots/FANUC_CRX25iAL.tsx +178 -0
- package/src/components/robots/KUKA_KR210_R2700.tsx +291 -0
- package/src/components/robots/KUKA_KR270_R2700.tsx +244 -0
- package/src/components/robots/RobotAnimator.tsx +83 -0
- package/src/components/robots/SupportedRobot.tsx +131 -0
- package/src/components/robots/UniversalRobots_UR10.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR10e.tsx +275 -0
- package/src/components/robots/UniversalRobots_UR3.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR3e.tsx +112 -0
- package/src/components/robots/UniversalRobots_UR5.tsx +111 -0
- package/src/components/robots/UniversalRobots_UR5e.tsx +280 -0
- package/src/components/robots/Yaskawa_AR1440.tsx +152 -0
- package/src/components/robots/Yaskawa_AR1730.tsx +165 -0
- package/src/components/robots/Yaskawa_AR2010.tsx +159 -0
- package/src/components/robots/Yaskawa_AR3120.tsx +160 -0
- package/src/components/robots/Yaskawa_AR900.tsx +121 -0
- package/src/components/utils/converters.ts +23 -0
- package/src/components/utils/errorHandling.ts +30 -0
- package/src/components/utils/hooks.tsx +54 -0
- package/src/components/utils/robotTreeQuery.ts +27 -0
- package/src/components/wandelscript-editor/WandelscriptEditor.stories.tsx +45 -0
- package/src/components/wandelscript-editor/WandelscriptEditor.tsx +114 -0
- package/src/components/wandelscript-editor/wandelscript.tmLanguage.ts +62 -0
- package/src/declarations.d.ts +10 -0
- package/src/i18n/config.ts +27 -0
- package/src/i18n/locales/de/translations.json +12 -0
- package/src/i18n/locales/en/translations.json +12 -0
- package/src/icons/arrowForwardFilled.tsx +7 -0
- package/src/icons/axis-x.svg +3 -0
- package/src/icons/axis-y.svg +3 -0
- package/src/icons/axis-z.svg +3 -0
- package/src/icons/expandFilled.tsx +11 -0
- package/src/icons/home.tsx +12 -0
- package/src/icons/infoOutlined.tsx +10 -0
- package/src/icons/jogging.svg +3 -0
- package/src/icons/robot.svg +3 -0
- package/src/icons/robot.tsx +14 -0
- package/src/icons/rotation.svg +4 -0
- package/src/icons/wbLogo.tsx +21 -0
- package/src/index.ts +7 -0
- package/src/themes/color.tsx +74 -0
- package/src/themes/theme.ts +150 -0
- package/src/themes/wbTheme.stories.tsx +64 -0
- package/src/themes/wbTheme.ts +186 -0
- package/dist/cjs/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
- package/dist/cjs/index.js +0 -5875
- package/dist/cjs/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
- package/dist/cjs/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
- package/dist/cjs/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
- package/dist/cjs/types/components/robots/ABB_1200_07_7.d.ts +0 -2
- package/dist/cjs/types/components/robots/AxisConfig.d.ts +0 -2
- package/dist/cjs/types/components/robots/DHRobot.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
- package/dist/cjs/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
- package/dist/cjs/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
- package/dist/cjs/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
- package/dist/cjs/types/components/robots/RobotAnimator.d.ts +0 -11
- package/dist/cjs/types/components/robots/SupportedRobot.d.ts +0 -14
- package/dist/cjs/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
- package/dist/cjs/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
- package/dist/cjs/types/components/robots/Yaskawa_AR900.d.ts +0 -2
- package/dist/cjs/types/components/utils/hooks.d.ts +0 -21
- package/dist/cjs/types/components/utils/robotTreeQuery.d.ts +0 -5
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
- package/dist/cjs/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
- package/dist/cjs/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
- package/dist/cjs/types/icons/arrowForwardFilled.d.ts +0 -1
- package/dist/cjs/types/icons/expandFilled.d.ts +0 -1
- package/dist/cjs/types/icons/home.d.ts +0 -1
- package/dist/cjs/types/icons/infoOutlined.d.ts +0 -1
- package/dist/cjs/types/icons/robot.d.ts +0 -1
- package/dist/cjs/types/icons/wbLogo.d.ts +0 -6
- package/dist/cjs/types/index.d.ts +0 -4
- package/dist/cjs/types/themes/color.d.ts +0 -9
- package/dist/cjs/types/themes/theme.d.ts +0 -143
- package/dist/cjs/types/themes/wbTheme.d.ts +0 -1
- package/dist/cjs/types/themes/wbTheme.stories.d.ts +0 -6
- package/dist/esm/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -2
- package/dist/esm/index.js +0 -5852
- package/dist/esm/types/components/3d-viewport/CoordinateSystemTransform.d.ts +0 -10
- package/dist/esm/types/components/3d-viewport/PresetEnvironment.d.ts +0 -6
- package/dist/esm/types/components/3d-viewport/SafetyZonesRenderer.d.ts +0 -6
- package/dist/esm/types/components/robots/ABB_1200_07_7.d.ts +0 -2
- package/dist/esm/types/components/robots/AxisConfig.d.ts +0 -2
- package/dist/esm/types/components/robots/DHRobot.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_100iD.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_ARC_Mate_120iD.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX10iA.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX25iA.d.ts +0 -2
- package/dist/esm/types/components/robots/FANUC_CRX25iAL.d.ts +0 -2
- package/dist/esm/types/components/robots/KUKA_KR210_R2700.d.ts +0 -2
- package/dist/esm/types/components/robots/KUKA_KR270_R2700.d.ts +0 -2
- package/dist/esm/types/components/robots/RobotAnimator.d.ts +0 -11
- package/dist/esm/types/components/robots/SupportedRobot.d.ts +0 -14
- package/dist/esm/types/components/robots/UniversalRobots_UR10.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR10e.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR3.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR3e.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR5.d.ts +0 -2
- package/dist/esm/types/components/robots/UniversalRobots_UR5e.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR1440.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR1730.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR2010.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR3120.d.ts +0 -2
- package/dist/esm/types/components/robots/Yaskawa_AR900.d.ts +0 -2
- package/dist/esm/types/components/utils/hooks.d.ts +0 -21
- package/dist/esm/types/components/utils/robotTreeQuery.d.ts +0 -5
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.d.ts +0 -12
- package/dist/esm/types/components/wandelscript-editor/WandelscriptEditor.stories.d.ts +0 -5
- package/dist/esm/types/components/wandelscript-editor/wandelscript.tmLanguage.d.ts +0 -44
- package/dist/esm/types/icons/arrowForwardFilled.d.ts +0 -1
- package/dist/esm/types/icons/expandFilled.d.ts +0 -1
- package/dist/esm/types/icons/home.d.ts +0 -1
- package/dist/esm/types/icons/index.d.ts +0 -6
- package/dist/esm/types/icons/infoOutlined.d.ts +0 -1
- package/dist/esm/types/icons/robot.d.ts +0 -1
- package/dist/esm/types/icons/wbLogo.d.ts +0 -6
- package/dist/esm/types/index.d.ts +0 -4
- package/dist/esm/types/themes/color.d.ts +0 -9
- package/dist/esm/types/themes/theme.d.ts +0 -143
- package/dist/esm/types/themes/wbTheme.d.ts +0 -1
- package/dist/esm/types/themes/wbTheme.stories.d.ts +0 -6
- package/dist/index.d.ts +0 -33
- /package/{dist/cjs/types/icons/index.d.ts → src/icons/index.ts} +0 -0
|
@@ -0,0 +1,280 @@
|
|
|
1
|
+
import { useGLTF } from "@react-three/drei"
|
|
2
|
+
import type * as THREE from "three"
|
|
3
|
+
import type { RobotProps } from "./SupportedRobot"
|
|
4
|
+
import { animated } from "@react-spring/three"
|
|
5
|
+
import RobotAnimator from "./RobotAnimator"
|
|
6
|
+
|
|
7
|
+
export function UniversalRobots_UR5e({
|
|
8
|
+
modelURL,
|
|
9
|
+
connectedMotionGroup,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
12
|
+
const gltf = useGLTF(modelURL) as any
|
|
13
|
+
const nodes = gltf.nodes
|
|
14
|
+
const materials = gltf.materials
|
|
15
|
+
|
|
16
|
+
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
17
|
+
jointObjects.forEach(
|
|
18
|
+
(object, index) => (object.rotation.y = jointValues[index]!),
|
|
19
|
+
)
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
return (
|
|
23
|
+
<>
|
|
24
|
+
<RobotAnimator
|
|
25
|
+
connectedMotionGroup={connectedMotionGroup}
|
|
26
|
+
robotRootObjectName="Scene"
|
|
27
|
+
onRotationChanged={setRotation}
|
|
28
|
+
/>
|
|
29
|
+
<group {...props} dispose={null}>
|
|
30
|
+
<group name="Scene">
|
|
31
|
+
<group name="UR5e" rotation={[Math.PI / 2, 0, 0]}>
|
|
32
|
+
<animated.group name="UR5e_J01" rotation={[-Math.PI / 2, 0, 0]}>
|
|
33
|
+
<animated.group
|
|
34
|
+
name="UR5e_J02"
|
|
35
|
+
position={[0, 0.162, 0]}
|
|
36
|
+
rotation={[Math.PI / 2, 0, 0]}
|
|
37
|
+
>
|
|
38
|
+
<animated.group name="UR5e_J03" position={[-0.425, 0, 0]}>
|
|
39
|
+
<animated.group name="UR5e_J04" position={[-0.392, 0, 0]}>
|
|
40
|
+
<animated.group
|
|
41
|
+
name="UR5e_J05"
|
|
42
|
+
position={[0, 0.133, 0]}
|
|
43
|
+
rotation={[Math.PI / 2, 0, 0]}
|
|
44
|
+
>
|
|
45
|
+
<animated.group
|
|
46
|
+
name="UR5e_J06"
|
|
47
|
+
position={[0, 0.1, 0]}
|
|
48
|
+
rotation={[-Math.PI / 2, 0, 0]}
|
|
49
|
+
>
|
|
50
|
+
<group name="UR5e_FLG" position={[0, 0.1, 0]}></group>
|
|
51
|
+
|
|
52
|
+
<group
|
|
53
|
+
name="UR5e_L06"
|
|
54
|
+
position={[0, 0.1, 0]}
|
|
55
|
+
rotation={[0, 0, -Math.PI]}
|
|
56
|
+
>
|
|
57
|
+
<>
|
|
58
|
+
<mesh
|
|
59
|
+
name="C-1000255"
|
|
60
|
+
castShadow
|
|
61
|
+
receiveShadow
|
|
62
|
+
geometry={nodes["C-1000255"].geometry}
|
|
63
|
+
material={materials.Black}
|
|
64
|
+
/>
|
|
65
|
+
<mesh
|
|
66
|
+
name="C-1000255_1"
|
|
67
|
+
castShadow
|
|
68
|
+
receiveShadow
|
|
69
|
+
geometry={nodes["C-1000255_1"].geometry}
|
|
70
|
+
material={materials.Metal}
|
|
71
|
+
/>
|
|
72
|
+
</>
|
|
73
|
+
</group>
|
|
74
|
+
</animated.group>
|
|
75
|
+
<group
|
|
76
|
+
name="UR5e_L05"
|
|
77
|
+
rotation={[-Math.PI / 2, -Math.PI / 3, 0]}
|
|
78
|
+
>
|
|
79
|
+
<>
|
|
80
|
+
<mesh
|
|
81
|
+
name="C-1000253"
|
|
82
|
+
castShadow
|
|
83
|
+
receiveShadow
|
|
84
|
+
geometry={nodes["C-1000253"].geometry}
|
|
85
|
+
material={materials.Blue}
|
|
86
|
+
/>
|
|
87
|
+
<mesh
|
|
88
|
+
name="C-1000253_1"
|
|
89
|
+
castShadow
|
|
90
|
+
receiveShadow
|
|
91
|
+
geometry={nodes["C-1000253_1"].geometry}
|
|
92
|
+
material={materials.Black}
|
|
93
|
+
/>
|
|
94
|
+
<mesh
|
|
95
|
+
name="C-1000253_2"
|
|
96
|
+
castShadow
|
|
97
|
+
receiveShadow
|
|
98
|
+
geometry={nodes["C-1000253_2"].geometry}
|
|
99
|
+
material={materials.Metal}
|
|
100
|
+
/>
|
|
101
|
+
<mesh
|
|
102
|
+
name="C-1000253_3"
|
|
103
|
+
castShadow
|
|
104
|
+
receiveShadow
|
|
105
|
+
geometry={nodes["C-1000253_3"].geometry}
|
|
106
|
+
material={materials.DarkGray}
|
|
107
|
+
/>
|
|
108
|
+
</>
|
|
109
|
+
</group>
|
|
110
|
+
</animated.group>
|
|
111
|
+
<group name="UR5e_L04" rotation={[0, -Math.PI / 3, 0]}>
|
|
112
|
+
<>
|
|
113
|
+
<mesh
|
|
114
|
+
name="C-1000251"
|
|
115
|
+
castShadow
|
|
116
|
+
receiveShadow
|
|
117
|
+
geometry={nodes["C-1000251"].geometry}
|
|
118
|
+
material={materials.Blue}
|
|
119
|
+
/>
|
|
120
|
+
<mesh
|
|
121
|
+
name="C-1000251_1"
|
|
122
|
+
castShadow
|
|
123
|
+
receiveShadow
|
|
124
|
+
geometry={nodes["C-1000251_1"].geometry}
|
|
125
|
+
material={materials.Black}
|
|
126
|
+
/>
|
|
127
|
+
<mesh
|
|
128
|
+
name="C-1000251_2"
|
|
129
|
+
castShadow
|
|
130
|
+
receiveShadow
|
|
131
|
+
geometry={nodes["C-1000251_2"].geometry}
|
|
132
|
+
material={materials.Metal}
|
|
133
|
+
/>
|
|
134
|
+
<mesh
|
|
135
|
+
name="C-1000251_3"
|
|
136
|
+
castShadow
|
|
137
|
+
receiveShadow
|
|
138
|
+
geometry={nodes["C-1000251_3"].geometry}
|
|
139
|
+
material={materials.DarkGray}
|
|
140
|
+
/>
|
|
141
|
+
</>
|
|
142
|
+
</group>
|
|
143
|
+
</animated.group>
|
|
144
|
+
<group name="UR5e_L03">
|
|
145
|
+
<>
|
|
146
|
+
<mesh
|
|
147
|
+
name="C-1000250"
|
|
148
|
+
castShadow
|
|
149
|
+
receiveShadow
|
|
150
|
+
geometry={nodes["C-1000250"].geometry}
|
|
151
|
+
material={materials.Black}
|
|
152
|
+
/>
|
|
153
|
+
<mesh
|
|
154
|
+
name="C-1000250_1"
|
|
155
|
+
castShadow
|
|
156
|
+
receiveShadow
|
|
157
|
+
geometry={nodes["C-1000250_1"].geometry}
|
|
158
|
+
material={materials.DarkGray}
|
|
159
|
+
/>
|
|
160
|
+
<mesh
|
|
161
|
+
name="C-1000250_2"
|
|
162
|
+
castShadow
|
|
163
|
+
receiveShadow
|
|
164
|
+
geometry={nodes["C-1000250_2"].geometry}
|
|
165
|
+
material={materials.Blue}
|
|
166
|
+
/>
|
|
167
|
+
<mesh
|
|
168
|
+
name="C-1000250_3"
|
|
169
|
+
castShadow
|
|
170
|
+
receiveShadow
|
|
171
|
+
geometry={nodes["C-1000250_3"].geometry}
|
|
172
|
+
material={materials.Metal}
|
|
173
|
+
/>
|
|
174
|
+
<mesh
|
|
175
|
+
name="C-1000250_4"
|
|
176
|
+
castShadow
|
|
177
|
+
receiveShadow
|
|
178
|
+
geometry={nodes["C-1000250_4"].geometry}
|
|
179
|
+
material={materials.Metal}
|
|
180
|
+
/>
|
|
181
|
+
</>
|
|
182
|
+
</group>
|
|
183
|
+
</animated.group>
|
|
184
|
+
<group name="UR5e_L02" rotation={[0, -Math.PI / 2, 0]}>
|
|
185
|
+
<>
|
|
186
|
+
<mesh
|
|
187
|
+
name="C-1000249"
|
|
188
|
+
castShadow
|
|
189
|
+
receiveShadow
|
|
190
|
+
geometry={nodes["C-1000249"].geometry}
|
|
191
|
+
material={materials.Metal}
|
|
192
|
+
/>
|
|
193
|
+
<mesh
|
|
194
|
+
name="C-1000249_1"
|
|
195
|
+
castShadow
|
|
196
|
+
receiveShadow
|
|
197
|
+
geometry={nodes["C-1000249_1"].geometry}
|
|
198
|
+
material={materials.Black}
|
|
199
|
+
/>
|
|
200
|
+
<mesh
|
|
201
|
+
name="C-1000249_2"
|
|
202
|
+
castShadow
|
|
203
|
+
receiveShadow
|
|
204
|
+
geometry={nodes["C-1000249_2"].geometry}
|
|
205
|
+
material={materials.DarkGray}
|
|
206
|
+
/>
|
|
207
|
+
<mesh
|
|
208
|
+
name="C-1000249_3"
|
|
209
|
+
castShadow
|
|
210
|
+
receiveShadow
|
|
211
|
+
geometry={nodes["C-1000249_3"].geometry}
|
|
212
|
+
material={materials.Blue}
|
|
213
|
+
/>
|
|
214
|
+
<mesh
|
|
215
|
+
name="C-1000249_4"
|
|
216
|
+
castShadow
|
|
217
|
+
receiveShadow
|
|
218
|
+
geometry={nodes["C-1000249_4"].geometry}
|
|
219
|
+
material={materials.Metal}
|
|
220
|
+
/>
|
|
221
|
+
</>
|
|
222
|
+
</group>
|
|
223
|
+
</animated.group>
|
|
224
|
+
<group name="UR5e_L01" rotation={[Math.PI / 2, 0, 0]}>
|
|
225
|
+
<>
|
|
226
|
+
<mesh
|
|
227
|
+
name="C-1000248"
|
|
228
|
+
castShadow
|
|
229
|
+
receiveShadow
|
|
230
|
+
geometry={nodes["C-1000248"].geometry}
|
|
231
|
+
material={materials.DarkGray}
|
|
232
|
+
/>
|
|
233
|
+
<mesh
|
|
234
|
+
name="C-1000248_1"
|
|
235
|
+
castShadow
|
|
236
|
+
receiveShadow
|
|
237
|
+
geometry={nodes["C-1000248_1"].geometry}
|
|
238
|
+
material={materials.Black}
|
|
239
|
+
/>
|
|
240
|
+
<mesh
|
|
241
|
+
name="C-1000248_2"
|
|
242
|
+
castShadow
|
|
243
|
+
receiveShadow
|
|
244
|
+
geometry={nodes["C-1000248_2"].geometry}
|
|
245
|
+
material={materials.Blue}
|
|
246
|
+
/>
|
|
247
|
+
<mesh
|
|
248
|
+
name="C-1000248_3"
|
|
249
|
+
castShadow
|
|
250
|
+
receiveShadow
|
|
251
|
+
geometry={nodes["C-1000248_3"].geometry}
|
|
252
|
+
material={materials.Metal}
|
|
253
|
+
/>
|
|
254
|
+
</>
|
|
255
|
+
</group>
|
|
256
|
+
</animated.group>
|
|
257
|
+
<group name="UR5e_L00">
|
|
258
|
+
<>
|
|
259
|
+
<mesh
|
|
260
|
+
name="C-1000257"
|
|
261
|
+
castShadow
|
|
262
|
+
receiveShadow
|
|
263
|
+
geometry={nodes["C-1000257"].geometry}
|
|
264
|
+
material={materials.Black}
|
|
265
|
+
/>
|
|
266
|
+
<mesh
|
|
267
|
+
name="C-1000257_1"
|
|
268
|
+
castShadow
|
|
269
|
+
receiveShadow
|
|
270
|
+
geometry={nodes["C-1000257_1"].geometry}
|
|
271
|
+
material={materials.Metal}
|
|
272
|
+
/>
|
|
273
|
+
</>
|
|
274
|
+
</group>
|
|
275
|
+
</group>
|
|
276
|
+
</group>
|
|
277
|
+
</group>
|
|
278
|
+
</>
|
|
279
|
+
)
|
|
280
|
+
}
|
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
import { useGLTF } from "@react-three/drei"
|
|
2
|
+
import type * as THREE from "three"
|
|
3
|
+
import type { RobotProps } from "./SupportedRobot"
|
|
4
|
+
import { animated } from "@react-spring/three"
|
|
5
|
+
import RobotAnimator from "./RobotAnimator"
|
|
6
|
+
|
|
7
|
+
export function Yaskawa_AR1440({ modelURL, connectedMotionGroup, ...props }: RobotProps) {
|
|
8
|
+
const gltf = useGLTF(modelURL) as any
|
|
9
|
+
|
|
10
|
+
const nodes = gltf.nodes
|
|
11
|
+
const materials = gltf.materials
|
|
12
|
+
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
13
|
+
const rotationSign = [1, -1, 1, 1, 1, 1]
|
|
14
|
+
|
|
15
|
+
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
16
|
+
jointObjects.forEach(
|
|
17
|
+
(object, index) =>
|
|
18
|
+
(object.rotation.y =
|
|
19
|
+
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<RobotAnimator
|
|
26
|
+
connectedMotionGroup={connectedMotionGroup}
|
|
27
|
+
robotRootObjectName="Scene"
|
|
28
|
+
onRotationChanged={setRotation}
|
|
29
|
+
/>
|
|
30
|
+
<group {...props} dispose={null}>
|
|
31
|
+
<group name="Scene">
|
|
32
|
+
<group name="AR1440" rotation={[Math.PI / 2, 0, 0]}>
|
|
33
|
+
<animated.group name="AR1440_J01" rotation={[-Math.PI / 2, 0, 0]}>
|
|
34
|
+
<animated.group
|
|
35
|
+
name="AR1440_J02"
|
|
36
|
+
position={[0.155, 0, 0]}
|
|
37
|
+
rotation={[Math.PI / 2, 0, Math.PI]}
|
|
38
|
+
>
|
|
39
|
+
<animated.group
|
|
40
|
+
name="AR1440_J03"
|
|
41
|
+
position={[0.614, 0, 0]}
|
|
42
|
+
rotation={[Math.PI, 0, 0]}
|
|
43
|
+
>
|
|
44
|
+
<animated.group
|
|
45
|
+
name="AR1440_J04"
|
|
46
|
+
position={[0.2, 0, 0]}
|
|
47
|
+
rotation={[-Math.PI / 2, 0, 0]}
|
|
48
|
+
>
|
|
49
|
+
<animated.group
|
|
50
|
+
name="AR1440_J05"
|
|
51
|
+
position={[0, -0.64, 0]}
|
|
52
|
+
rotation={[Math.PI / 2, 0, 0]}
|
|
53
|
+
>
|
|
54
|
+
<animated.group
|
|
55
|
+
name="AR1440_J06"
|
|
56
|
+
rotation={[-Math.PI / 2, 0, 0]}
|
|
57
|
+
>
|
|
58
|
+
<group
|
|
59
|
+
name="AR1440_FLG"
|
|
60
|
+
position={[0, -0.1, 0]}
|
|
61
|
+
rotation={[-Math.PI, 0, 0]}
|
|
62
|
+
></group>
|
|
63
|
+
<mesh
|
|
64
|
+
name="AR1440_L06_CAD"
|
|
65
|
+
castShadow
|
|
66
|
+
receiveShadow
|
|
67
|
+
geometry={nodes.AR1440_L06_CAD.geometry}
|
|
68
|
+
material={materials.metall}
|
|
69
|
+
/>
|
|
70
|
+
</animated.group>
|
|
71
|
+
<mesh
|
|
72
|
+
name="AR1440_L05_CAD"
|
|
73
|
+
castShadow
|
|
74
|
+
receiveShadow
|
|
75
|
+
geometry={nodes.AR1440_L05_CAD.geometry}
|
|
76
|
+
material={materials.yaskawaBlueMetall}
|
|
77
|
+
/>
|
|
78
|
+
</animated.group>
|
|
79
|
+
<group name="AR1440_L04_CAD">
|
|
80
|
+
<mesh
|
|
81
|
+
name="AR1440_L04_CAD001"
|
|
82
|
+
castShadow
|
|
83
|
+
receiveShadow
|
|
84
|
+
geometry={nodes.AR1440_L04_CAD001.geometry}
|
|
85
|
+
material={materials.yaskawaBlueMetall}
|
|
86
|
+
/>
|
|
87
|
+
<mesh
|
|
88
|
+
name="AR1440_L04_CAD001_1"
|
|
89
|
+
castShadow
|
|
90
|
+
receiveShadow
|
|
91
|
+
geometry={nodes.AR1440_L04_CAD001_1.geometry}
|
|
92
|
+
material={materials.white}
|
|
93
|
+
/>
|
|
94
|
+
</group>
|
|
95
|
+
</animated.group>
|
|
96
|
+
<group name="AR1440_L03_CAD">
|
|
97
|
+
<mesh
|
|
98
|
+
name="AR1440_L03_CAD001"
|
|
99
|
+
castShadow
|
|
100
|
+
receiveShadow
|
|
101
|
+
geometry={nodes.AR1440_L03_CAD001.geometry}
|
|
102
|
+
material={materials.yaskawaBlueMetall}
|
|
103
|
+
/>
|
|
104
|
+
<mesh
|
|
105
|
+
name="AR1440_L03_CAD001_1"
|
|
106
|
+
castShadow
|
|
107
|
+
receiveShadow
|
|
108
|
+
geometry={nodes.AR1440_L03_CAD001_1.geometry}
|
|
109
|
+
material={materials.blackMetall}
|
|
110
|
+
/>
|
|
111
|
+
</group>
|
|
112
|
+
</animated.group>
|
|
113
|
+
<mesh
|
|
114
|
+
name="AR1440_L02_CAD"
|
|
115
|
+
castShadow
|
|
116
|
+
receiveShadow
|
|
117
|
+
geometry={nodes.AR1440_L02_CAD.geometry}
|
|
118
|
+
material={materials.yaskawaBlueMetall}
|
|
119
|
+
/>
|
|
120
|
+
</animated.group>
|
|
121
|
+
<group name="AR1440_L01_CAD">
|
|
122
|
+
<mesh
|
|
123
|
+
name="AR1440_L01_CAD001"
|
|
124
|
+
castShadow
|
|
125
|
+
receiveShadow
|
|
126
|
+
geometry={nodes.AR1440_L01_CAD001.geometry}
|
|
127
|
+
material={materials.yaskawaBlueMetall}
|
|
128
|
+
/>
|
|
129
|
+
<mesh
|
|
130
|
+
name="AR1440_L01_CAD001_1"
|
|
131
|
+
castShadow
|
|
132
|
+
receiveShadow
|
|
133
|
+
geometry={nodes.AR1440_L01_CAD001_1.geometry}
|
|
134
|
+
material={materials.blackMetall}
|
|
135
|
+
/>
|
|
136
|
+
</group>
|
|
137
|
+
</animated.group>
|
|
138
|
+
<mesh
|
|
139
|
+
name="AR1440_L00_CAD"
|
|
140
|
+
castShadow
|
|
141
|
+
receiveShadow
|
|
142
|
+
geometry={nodes.AR1440_L00_CAD.geometry}
|
|
143
|
+
material={materials.yaskawaBlueMetall}
|
|
144
|
+
position={[0, 0, 0.45]}
|
|
145
|
+
rotation={[-Math.PI / 2, 0, 0]}
|
|
146
|
+
/>
|
|
147
|
+
</group>
|
|
148
|
+
</group>
|
|
149
|
+
</group>
|
|
150
|
+
</>
|
|
151
|
+
)
|
|
152
|
+
}
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { useGLTF } from "@react-three/drei"
|
|
2
|
+
import type * as THREE from "three"
|
|
3
|
+
import type { RobotProps } from "./SupportedRobot"
|
|
4
|
+
import { animated } from "@react-spring/three"
|
|
5
|
+
import RobotAnimator from "./RobotAnimator"
|
|
6
|
+
|
|
7
|
+
export function Yaskawa_AR1730({ modelURL, connectedMotionGroup, ...props }: RobotProps) {
|
|
8
|
+
const gltf = useGLTF(modelURL) as any
|
|
9
|
+
|
|
10
|
+
const nodes = gltf.nodes
|
|
11
|
+
const materials = gltf.materials
|
|
12
|
+
const rotationOffsets = [0, -Math.PI / 2, 0, 0, 0, 0]
|
|
13
|
+
const rotationSign = [1, -1, 1, 1, 1, 1]
|
|
14
|
+
|
|
15
|
+
function setRotation(jointObjects: THREE.Object3D[], jointValues: number[]) {
|
|
16
|
+
jointObjects.forEach(
|
|
17
|
+
(object, index) =>
|
|
18
|
+
(object.rotation.y =
|
|
19
|
+
rotationSign[index]! * jointValues[index]! + rotationOffsets[index]!),
|
|
20
|
+
)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
return (
|
|
24
|
+
<>
|
|
25
|
+
<RobotAnimator
|
|
26
|
+
connectedMotionGroup={connectedMotionGroup}
|
|
27
|
+
robotRootObjectName="Scene"
|
|
28
|
+
onRotationChanged={setRotation}
|
|
29
|
+
/>
|
|
30
|
+
<group {...props} dispose={null}>
|
|
31
|
+
<group name="Scene">
|
|
32
|
+
<animated.group name="AR1730_J00">
|
|
33
|
+
<animated.group
|
|
34
|
+
name="AR1730_J01"
|
|
35
|
+
position={[0.15, 0, 0]}
|
|
36
|
+
rotation={[-Math.PI / 2, -Math.PI / 2, 0]}
|
|
37
|
+
>
|
|
38
|
+
<animated.group
|
|
39
|
+
name="AR1730_J02"
|
|
40
|
+
position={[0.76, 0, 0]}
|
|
41
|
+
rotation={[-Math.PI, 0, 0]}
|
|
42
|
+
>
|
|
43
|
+
<animated.group
|
|
44
|
+
name="AR1730_J03"
|
|
45
|
+
position={[0.2, 0, 0]}
|
|
46
|
+
rotation={[-Math.PI / 2, 0, 0]}
|
|
47
|
+
>
|
|
48
|
+
<animated.group
|
|
49
|
+
name="AR1730_J04"
|
|
50
|
+
position={[0, -0.795, 0]}
|
|
51
|
+
rotation={[Math.PI / 2, 0, 0]}
|
|
52
|
+
>
|
|
53
|
+
<animated.group
|
|
54
|
+
name="AR1730_J05"
|
|
55
|
+
rotation={[-Math.PI / 2, 0, 0]}
|
|
56
|
+
>
|
|
57
|
+
<group
|
|
58
|
+
name="AR1730_FLG"
|
|
59
|
+
position={[0, -0.1, 0]}
|
|
60
|
+
rotation={[-Math.PI, 0, 0]}
|
|
61
|
+
/>
|
|
62
|
+
<mesh
|
|
63
|
+
name="AR1730_L06"
|
|
64
|
+
castShadow
|
|
65
|
+
receiveShadow
|
|
66
|
+
geometry={nodes.AR1730_L06.geometry}
|
|
67
|
+
material={materials.Metal}
|
|
68
|
+
rotation={[Math.PI / 2, -Math.PI / 2, 0]}
|
|
69
|
+
/>
|
|
70
|
+
</animated.group>
|
|
71
|
+
<mesh
|
|
72
|
+
name="AR1730_L05"
|
|
73
|
+
castShadow
|
|
74
|
+
receiveShadow
|
|
75
|
+
geometry={nodes.AR1730_L05.geometry}
|
|
76
|
+
material={materials.Blue}
|
|
77
|
+
rotation={[Math.PI / 2, 0, Math.PI / 2]}
|
|
78
|
+
/>
|
|
79
|
+
</animated.group>
|
|
80
|
+
<group
|
|
81
|
+
name="AR1730_L04"
|
|
82
|
+
position={[0, -0.302, 0]}
|
|
83
|
+
rotation={[0, 0, -Math.PI / 2]}
|
|
84
|
+
>
|
|
85
|
+
<mesh
|
|
86
|
+
name="_R_AXIS_SW0001002"
|
|
87
|
+
castShadow
|
|
88
|
+
receiveShadow
|
|
89
|
+
geometry={nodes._R_AXIS_SW0001002.geometry}
|
|
90
|
+
material={materials.Blue}
|
|
91
|
+
/>
|
|
92
|
+
<mesh
|
|
93
|
+
name="_R_AXIS_SW0001002_1"
|
|
94
|
+
castShadow
|
|
95
|
+
receiveShadow
|
|
96
|
+
geometry={nodes._R_AXIS_SW0001002_1.geometry}
|
|
97
|
+
material={materials.White}
|
|
98
|
+
/>
|
|
99
|
+
</group>
|
|
100
|
+
</animated.group>
|
|
101
|
+
<group
|
|
102
|
+
name="AR1730_L03"
|
|
103
|
+
rotation={[Math.PI / 2, 0, -Math.PI / 2]}
|
|
104
|
+
>
|
|
105
|
+
<mesh
|
|
106
|
+
name="_U_AXIS_SW0001002"
|
|
107
|
+
castShadow
|
|
108
|
+
receiveShadow
|
|
109
|
+
geometry={nodes._U_AXIS_SW0001002.geometry}
|
|
110
|
+
material={materials.Blue}
|
|
111
|
+
/>
|
|
112
|
+
<mesh
|
|
113
|
+
name="_U_AXIS_SW0001002_1"
|
|
114
|
+
castShadow
|
|
115
|
+
receiveShadow
|
|
116
|
+
geometry={nodes._U_AXIS_SW0001002_1.geometry}
|
|
117
|
+
material={materials.Black}
|
|
118
|
+
/>
|
|
119
|
+
</group>
|
|
120
|
+
</animated.group>
|
|
121
|
+
<mesh
|
|
122
|
+
name="AR1730_L02"
|
|
123
|
+
castShadow
|
|
124
|
+
receiveShadow
|
|
125
|
+
geometry={nodes.AR1730_L02.geometry}
|
|
126
|
+
material={materials.Blue}
|
|
127
|
+
position={[0, -0.157, 0]}
|
|
128
|
+
rotation={[-Math.PI, -1.571, 0]}
|
|
129
|
+
/>
|
|
130
|
+
</animated.group>
|
|
131
|
+
<group
|
|
132
|
+
name="AR1730_L01"
|
|
133
|
+
position={[0, -0.336, 0]}
|
|
134
|
+
rotation={[Math.PI / 2, 0, -Math.PI / 2]}
|
|
135
|
+
>
|
|
136
|
+
<mesh
|
|
137
|
+
name="_S_AXIS_SW0001002"
|
|
138
|
+
castShadow
|
|
139
|
+
receiveShadow
|
|
140
|
+
geometry={nodes._S_AXIS_SW0001002.geometry}
|
|
141
|
+
material={materials.Blue}
|
|
142
|
+
/>
|
|
143
|
+
<mesh
|
|
144
|
+
name="_S_AXIS_SW0001002_1"
|
|
145
|
+
castShadow
|
|
146
|
+
receiveShadow
|
|
147
|
+
geometry={nodes._S_AXIS_SW0001002_1.geometry}
|
|
148
|
+
material={materials.Black}
|
|
149
|
+
/>
|
|
150
|
+
</group>
|
|
151
|
+
</animated.group>
|
|
152
|
+
<mesh
|
|
153
|
+
name="AR1730_L00"
|
|
154
|
+
castShadow
|
|
155
|
+
receiveShadow
|
|
156
|
+
geometry={nodes.AR1730_L00.geometry}
|
|
157
|
+
material={materials.Blue}
|
|
158
|
+
position={[0, -0.505, 0]}
|
|
159
|
+
rotation={[Math.PI / 2, 0, -Math.PI / 2]}
|
|
160
|
+
/>
|
|
161
|
+
</group>
|
|
162
|
+
</group>
|
|
163
|
+
</>
|
|
164
|
+
)
|
|
165
|
+
}
|