@wandelbots/wandelbots-js-react-components 1.3.2 → 1.4.0
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/package.json +1 -2
- package/src/components/3d-viewport/SafetyZonesRenderer.tsx +2 -1
- package/src/components/robots/ABB_1200_07_7.tsx +6 -2
- package/src/components/robots/DHRobot.tsx +28 -29
- package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +2 -2
- package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +2 -2
- package/src/components/robots/FANUC_CRX10iA.tsx +6 -2
- package/src/components/robots/FANUC_CRX25iA.tsx +6 -2
- package/src/components/robots/FANUC_CRX25iAL.tsx +6 -2
- package/src/components/robots/KUKA_KR210_R2700.tsx +2 -2
- package/src/components/robots/KUKA_KR270_R2700.tsx +2 -2
- package/src/components/robots/Robot.tsx +42 -0
- package/src/components/robots/RobotAnimator.tsx +5 -6
- package/src/components/robots/SupportedRobot.tsx +23 -10
- package/src/components/robots/UniversalRobots_UR10.tsx +2 -2
- package/src/components/robots/UniversalRobots_UR10e.tsx +2 -2
- package/src/components/robots/UniversalRobots_UR3.tsx +2 -2
- package/src/components/robots/UniversalRobots_UR3e.tsx +2 -2
- package/src/components/robots/UniversalRobots_UR5.tsx +2 -2
- package/src/components/robots/UniversalRobots_UR5e.tsx +2 -2
- package/src/components/robots/Yaskawa_AR1440.tsx +6 -2
- package/src/components/robots/Yaskawa_AR1730.tsx +6 -2
- package/src/components/robots/Yaskawa_AR2010.tsx +6 -2
- package/src/components/robots/Yaskawa_AR3120.tsx +6 -2
- package/src/components/robots/Yaskawa_AR900.tsx +6 -2
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@wandelbots/wandelbots-js-react-components",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "React UI toolkit for building applications on top of the Wandelbots platform",
|
|
5
5
|
"files": [
|
|
6
6
|
"dist",
|
|
@@ -23,7 +23,6 @@
|
|
|
23
23
|
"tsc": "tsc --pretty --noEmit",
|
|
24
24
|
"test": "npm run build",
|
|
25
25
|
"build": "rimraf dist && vite build && tsc --declaration --emitDeclarationOnly",
|
|
26
|
-
"build:dev": "rollup -c rollup.config.dev.mjs",
|
|
27
26
|
"build-storybook": "storybook build"
|
|
28
27
|
},
|
|
29
28
|
"repository": {
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import { SafetySetupSafetyZone
|
|
1
|
+
import { SafetySetupSafetyZone } from "@wandelbots/wandelbots-js"
|
|
2
|
+
import { Geometry } from "@wandelbots/wandelbots-api-client"
|
|
2
3
|
import * as THREE from "three"
|
|
3
4
|
import { ConvexGeometry } from "three-stdlib"
|
|
4
5
|
import { type GroupProps } from "@react-three/fiber"
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function ABB_1200_07_7({
|
|
7
|
+
export function ABB_1200_07_7({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
const nodes = gltf.nodes
|
|
10
14
|
const materials = gltf.materials
|
|
@@ -20,7 +24,7 @@ export function ABB_1200_07_7({ modelURL, connectedMotionGroup, ...props }: Robo
|
|
|
20
24
|
return (
|
|
21
25
|
<>
|
|
22
26
|
<RobotAnimator
|
|
23
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
24
28
|
robotRootObjectName="Scene"
|
|
25
29
|
onRotationChanged={setRotation}
|
|
26
30
|
/>
|
|
@@ -13,7 +13,11 @@ import type { DHRobotProps } from "./SupportedRobot"
|
|
|
13
13
|
const CHILD_LINE = "line"
|
|
14
14
|
const CHILD_MESH = "mesh"
|
|
15
15
|
|
|
16
|
-
export function DHRobot({
|
|
16
|
+
export function DHRobot({
|
|
17
|
+
rapidlyChangingMotionState,
|
|
18
|
+
dhParameters,
|
|
19
|
+
...props
|
|
20
|
+
}: DHRobotProps) {
|
|
17
21
|
// reused in every update
|
|
18
22
|
const accumulatedMatrix = new Matrix4()
|
|
19
23
|
|
|
@@ -53,13 +57,11 @@ export function DHRobot({ connectedMotionGroup, ...props }: DHRobotProps) {
|
|
|
53
57
|
mesh: THREE.Mesh,
|
|
54
58
|
jointValue: number,
|
|
55
59
|
) {
|
|
56
|
-
|
|
57
|
-
connectedMotionGroup.motionGroupSpecification.dh_parameters
|
|
58
|
-
if (!dh_parameters) {
|
|
60
|
+
if (!dhParameters) {
|
|
59
61
|
return
|
|
60
62
|
}
|
|
61
63
|
|
|
62
|
-
const dh_parameter =
|
|
64
|
+
const dh_parameter = dhParameters[jointIndex]
|
|
63
65
|
if (!dh_parameter) {
|
|
64
66
|
return
|
|
65
67
|
}
|
|
@@ -90,7 +92,7 @@ export function DHRobot({ connectedMotionGroup, ...props }: DHRobotProps) {
|
|
|
90
92
|
return (
|
|
91
93
|
<>
|
|
92
94
|
<RobotAnimator
|
|
93
|
-
|
|
95
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
94
96
|
robotRootObjectName="Scene"
|
|
95
97
|
onRotationChanged={setRotation}
|
|
96
98
|
jointCollector={getAllJoints}
|
|
@@ -100,29 +102,26 @@ export function DHRobot({ connectedMotionGroup, ...props }: DHRobotProps) {
|
|
|
100
102
|
<sphereGeometry args={[0.01, 32, 32]} />
|
|
101
103
|
<meshStandardMaterial color={"black"} depthTest={true} />
|
|
102
104
|
</mesh>
|
|
103
|
-
{
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
/>
|
|
118
|
-
<
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
)
|
|
124
|
-
},
|
|
125
|
-
)}
|
|
105
|
+
{dhParameters!.map((param, index) => {
|
|
106
|
+
const { a, b } = getLinePoints(
|
|
107
|
+
param,
|
|
108
|
+
rapidlyChangingMotionState.state.joint_position.joints[index] ?? 0,
|
|
109
|
+
)
|
|
110
|
+
return (
|
|
111
|
+
<group name={`group_${index}`} key={"group_" + index}>
|
|
112
|
+
<Line
|
|
113
|
+
name={CHILD_LINE}
|
|
114
|
+
points={[a, b]}
|
|
115
|
+
color={"white"}
|
|
116
|
+
lineWidth={5}
|
|
117
|
+
/>
|
|
118
|
+
<mesh name={CHILD_MESH} key={"mesh_" + index} position={b}>
|
|
119
|
+
<sphereGeometry args={[0.01, 32, 32]} />
|
|
120
|
+
<meshStandardMaterial color={"black"} depthTest={true} />
|
|
121
|
+
</mesh>
|
|
122
|
+
</group>
|
|
123
|
+
)
|
|
124
|
+
})}
|
|
126
125
|
</group>
|
|
127
126
|
</>
|
|
128
127
|
)
|
|
@@ -6,7 +6,7 @@ import { animated } from "@react-spring/three"
|
|
|
6
6
|
|
|
7
7
|
export function FANUC_ARC_Mate_100iD({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -24,7 +24,7 @@ export function FANUC_ARC_Mate_100iD({
|
|
|
24
24
|
return (
|
|
25
25
|
<>
|
|
26
26
|
<RobotAnimator
|
|
27
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
28
28
|
robotRootObjectName="Scene"
|
|
29
29
|
onRotationChanged={setRotation}
|
|
30
30
|
/>
|
|
@@ -6,7 +6,7 @@ import { animated } from "@react-spring/three"
|
|
|
6
6
|
|
|
7
7
|
export function FANUC_ARC_Mate_120iD({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -24,7 +24,7 @@ export function FANUC_ARC_Mate_120iD({
|
|
|
24
24
|
return (
|
|
25
25
|
<>
|
|
26
26
|
<RobotAnimator
|
|
27
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
28
28
|
robotRootObjectName="Scene"
|
|
29
29
|
onRotationChanged={setRotation}
|
|
30
30
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import RobotAnimator from "./RobotAnimator"
|
|
5
5
|
import { animated } from "@react-spring/three"
|
|
6
6
|
|
|
7
|
-
export function FANUC_CRX10iA({
|
|
7
|
+
export function FANUC_CRX10iA({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
const nodes = gltf.nodes
|
|
10
14
|
const materials = gltf.materials
|
|
@@ -20,7 +24,7 @@ export function FANUC_CRX10iA({ modelURL, connectedMotionGroup, ...props }: Robo
|
|
|
20
24
|
return (
|
|
21
25
|
<>
|
|
22
26
|
<RobotAnimator
|
|
23
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
24
28
|
robotRootObjectName="Scene"
|
|
25
29
|
onRotationChanged={setRotation}
|
|
26
30
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function FANUC_CRX25iA({
|
|
7
|
+
export function FANUC_CRX25iA({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
const nodes = gltf.nodes
|
|
10
14
|
const materials = gltf.materials
|
|
@@ -20,7 +24,7 @@ export function FANUC_CRX25iA({ modelURL, connectedMotionGroup, ...props }: Robo
|
|
|
20
24
|
return (
|
|
21
25
|
<>
|
|
22
26
|
<RobotAnimator
|
|
23
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
24
28
|
robotRootObjectName="Scene"
|
|
25
29
|
onRotationChanged={setRotation}
|
|
26
30
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function FANUC_CRX25iAL({
|
|
7
|
+
export function FANUC_CRX25iAL({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
const nodes = gltf.nodes
|
|
10
14
|
const materials = gltf.materials
|
|
@@ -20,7 +24,7 @@ export function FANUC_CRX25iAL({ modelURL, connectedMotionGroup, ...props }: Rob
|
|
|
20
24
|
return (
|
|
21
25
|
<>
|
|
22
26
|
<RobotAnimator
|
|
23
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
24
28
|
robotRootObjectName="Scene"
|
|
25
29
|
onRotationChanged={setRotation}
|
|
26
30
|
/>
|
|
@@ -6,7 +6,7 @@ import RobotAnimator from "./RobotAnimator"
|
|
|
6
6
|
|
|
7
7
|
export function KUKA_KR210_R2700({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -26,7 +26,7 @@ export function KUKA_KR210_R2700({
|
|
|
26
26
|
return (
|
|
27
27
|
<>
|
|
28
28
|
<RobotAnimator
|
|
29
|
-
|
|
29
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
30
30
|
robotRootObjectName="Scene"
|
|
31
31
|
onRotationChanged={setRotation}
|
|
32
32
|
/>
|
|
@@ -6,7 +6,7 @@ import RobotAnimator from "./RobotAnimator"
|
|
|
6
6
|
|
|
7
7
|
export function KUKA_KR270_R2700({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -26,7 +26,7 @@ export function KUKA_KR270_R2700({
|
|
|
26
26
|
return (
|
|
27
27
|
<>
|
|
28
28
|
<RobotAnimator
|
|
29
|
-
|
|
29
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
30
30
|
robotRootObjectName="Scene"
|
|
31
31
|
onRotationChanged={setRotation}
|
|
32
32
|
/>
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { type GroupProps } from "@react-three/fiber"
|
|
2
|
+
|
|
3
|
+
import type { ConnectedMotionGroup } from "@wandelbots/wandelbots-js"
|
|
4
|
+
import { defaultGetModel, SupportedRobot } from "./SupportedRobot"
|
|
5
|
+
|
|
6
|
+
export type ConnectecMotionGroupRobotProps = {
|
|
7
|
+
connectedMotionGroup: ConnectedMotionGroup
|
|
8
|
+
getModel?: (modelFromController: string) => string
|
|
9
|
+
} & GroupProps
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* The Robot component is a wrapper around the SupportedRobot component
|
|
13
|
+
* for usage with @wandelbots/wandelbots-js ConnectedMotionGroup object.
|
|
14
|
+
*
|
|
15
|
+
* @param {ConnectecMotionGroupRobotProps} props - The properties for the Robot component.
|
|
16
|
+
* @param {ConnectedMotionGroup} props.connectedMotionGroup - The connected motion group containing motion state and parameters.
|
|
17
|
+
* @param {Function} [props.getModel=defaultGetModel] - Optional function to get the model URL. Defaults to defaultGetModel.
|
|
18
|
+
* @param {Object} props - Additional properties passed to the SupportedRobot component.
|
|
19
|
+
*
|
|
20
|
+
* @returns {JSX.Element} The rendered SupportedRobot component.
|
|
21
|
+
*/
|
|
22
|
+
export function Robot({
|
|
23
|
+
connectedMotionGroup,
|
|
24
|
+
getModel = defaultGetModel,
|
|
25
|
+
...props
|
|
26
|
+
}: ConnectecMotionGroupRobotProps) {
|
|
27
|
+
if (!connectedMotionGroup.dhParameters) {
|
|
28
|
+
return null
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
return (
|
|
32
|
+
<SupportedRobot
|
|
33
|
+
rapidlyChangingMotionState={
|
|
34
|
+
connectedMotionGroup.rapidlyChangingMotionState
|
|
35
|
+
}
|
|
36
|
+
modelFromController={connectedMotionGroup.modelFromController || ""}
|
|
37
|
+
dhParameters={connectedMotionGroup.dhParameters}
|
|
38
|
+
getModel={getModel}
|
|
39
|
+
{...props}
|
|
40
|
+
/>
|
|
41
|
+
)
|
|
42
|
+
}
|
|
@@ -6,18 +6,18 @@ import {
|
|
|
6
6
|
getAllJointsByName,
|
|
7
7
|
type RobotSceneJoint,
|
|
8
8
|
} from "../utils/robotTreeQuery"
|
|
9
|
-
import type {
|
|
9
|
+
import type { MotionGroupStateResponse } from "@wandelbots/wandelbots-api-client"
|
|
10
10
|
import { useAutorun } from "../utils/hooks"
|
|
11
11
|
|
|
12
12
|
type RobotAnimatorProps = {
|
|
13
|
-
|
|
13
|
+
rapidlyChangingMotionState: MotionGroupStateResponse
|
|
14
14
|
robotRootObjectName: string
|
|
15
15
|
onRotationChanged: (joints: THREE.Object3D[], jointValues: number[]) => void
|
|
16
16
|
jointCollector?: (rootObject: THREE.Object3D) => RobotSceneJoint[]
|
|
17
17
|
}
|
|
18
18
|
|
|
19
19
|
export default function RobotAnimator({
|
|
20
|
-
|
|
20
|
+
rapidlyChangingMotionState,
|
|
21
21
|
robotRootObjectName,
|
|
22
22
|
onRotationChanged,
|
|
23
23
|
jointCollector,
|
|
@@ -58,7 +58,7 @@ export default function RobotAnimator({
|
|
|
58
58
|
|
|
59
59
|
useAutorun(() => {
|
|
60
60
|
const newJointValues =
|
|
61
|
-
|
|
61
|
+
rapidlyChangingMotionState.state.joint_position.joints.filter(
|
|
62
62
|
(item) => item !== undefined,
|
|
63
63
|
)
|
|
64
64
|
|
|
@@ -68,8 +68,7 @@ export default function RobotAnimator({
|
|
|
68
68
|
const [axisValues, setSpring] = useSpring(() => ({
|
|
69
69
|
...Object.assign(
|
|
70
70
|
{},
|
|
71
|
-
|
|
72
|
-
.joints,
|
|
71
|
+
rapidlyChangingMotionState.state.joint_position.joints,
|
|
73
72
|
),
|
|
74
73
|
onChange: () => {
|
|
75
74
|
setRotation()
|
|
@@ -21,34 +21,42 @@ import { FANUC_ARC_Mate_120iD } from "./FANUC_ARC_Mate_120iD"
|
|
|
21
21
|
import { ABB_1200_07_7 } from "./ABB_1200_07_7"
|
|
22
22
|
|
|
23
23
|
import type { GroupProps } from "@react-three/fiber"
|
|
24
|
-
import type {
|
|
24
|
+
import type {
|
|
25
|
+
MotionGroupStateResponse,
|
|
26
|
+
DHParameter,
|
|
27
|
+
} from "@wandelbots/wandelbots-api-client"
|
|
25
28
|
import { DHRobot } from "./DHRobot"
|
|
26
29
|
|
|
27
30
|
export type DHRobotProps = {
|
|
28
|
-
|
|
31
|
+
rapidlyChangingMotionState: MotionGroupStateResponse
|
|
32
|
+
dhParameters: Array<DHParameter>
|
|
29
33
|
} & GroupProps
|
|
30
34
|
|
|
31
35
|
export type RobotProps = {
|
|
32
|
-
|
|
36
|
+
rapidlyChangingMotionState: MotionGroupStateResponse
|
|
33
37
|
modelURL: string
|
|
34
38
|
} & GroupProps
|
|
35
39
|
|
|
36
40
|
export type SupportedRobotProps = {
|
|
37
|
-
|
|
41
|
+
rapidlyChangingMotionState: MotionGroupStateResponse
|
|
42
|
+
modelFromController: string
|
|
43
|
+
dhParameters: DHParameter[]
|
|
38
44
|
getModel?: (modelFromController: string) => string
|
|
39
45
|
} & GroupProps
|
|
40
46
|
|
|
41
|
-
function defaultGetModel(modelFromController: string): string {
|
|
47
|
+
export function defaultGetModel(modelFromController: string): string {
|
|
42
48
|
return `https://cdn.jsdelivr.net/gh/wandelbotsgmbh/wandelbots-js-react-components/public/models/${modelFromController}.glb`
|
|
43
49
|
}
|
|
44
50
|
|
|
45
51
|
export function SupportedRobot({
|
|
46
|
-
|
|
52
|
+
rapidlyChangingMotionState,
|
|
53
|
+
modelFromController,
|
|
54
|
+
dhParameters,
|
|
47
55
|
getModel = defaultGetModel,
|
|
48
56
|
...props
|
|
49
57
|
}: SupportedRobotProps) {
|
|
50
58
|
let Robot
|
|
51
|
-
|
|
59
|
+
|
|
52
60
|
switch (modelFromController) {
|
|
53
61
|
case "UniversalRobots_UR3":
|
|
54
62
|
Robot = UniversalRobots_UR3
|
|
@@ -118,12 +126,17 @@ export function SupportedRobot({
|
|
|
118
126
|
return (
|
|
119
127
|
<Suspense
|
|
120
128
|
fallback={
|
|
121
|
-
<DHRobot
|
|
129
|
+
<DHRobot
|
|
130
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
131
|
+
dhParameters={dhParameters}
|
|
132
|
+
{...props}
|
|
133
|
+
/>
|
|
122
134
|
}
|
|
123
135
|
>
|
|
124
136
|
<Robot
|
|
125
|
-
|
|
126
|
-
modelURL={getModel(modelFromController
|
|
137
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
138
|
+
modelURL={getModel(modelFromController)}
|
|
139
|
+
dhParameters={dhParameters}
|
|
127
140
|
{...props}
|
|
128
141
|
/>
|
|
129
142
|
</Suspense>
|
|
@@ -6,7 +6,7 @@ import { animated } from "@react-spring/three"
|
|
|
6
6
|
|
|
7
7
|
export function UniversalRobots_UR10({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -22,7 +22,7 @@ export function UniversalRobots_UR10({
|
|
|
22
22
|
return (
|
|
23
23
|
<>
|
|
24
24
|
<RobotAnimator
|
|
25
|
-
|
|
25
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
26
|
robotRootObjectName="Scene"
|
|
27
27
|
onRotationChanged={setRotation}
|
|
28
28
|
/>
|
|
@@ -6,7 +6,7 @@ import type * as THREE from "three"
|
|
|
6
6
|
|
|
7
7
|
export function UniversalRobots_UR10e({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -22,7 +22,7 @@ export function UniversalRobots_UR10e({
|
|
|
22
22
|
return (
|
|
23
23
|
<>
|
|
24
24
|
<RobotAnimator
|
|
25
|
-
|
|
25
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
26
|
robotRootObjectName="Scene"
|
|
27
27
|
onRotationChanged={setRotation}
|
|
28
28
|
/>
|
|
@@ -6,7 +6,7 @@ import RobotAnimator from "./RobotAnimator"
|
|
|
6
6
|
|
|
7
7
|
export function UniversalRobots_UR3({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -22,7 +22,7 @@ export function UniversalRobots_UR3({
|
|
|
22
22
|
return (
|
|
23
23
|
<>
|
|
24
24
|
<RobotAnimator
|
|
25
|
-
|
|
25
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
26
|
robotRootObjectName="Scene"
|
|
27
27
|
onRotationChanged={setRotation}
|
|
28
28
|
/>
|
|
@@ -6,7 +6,7 @@ import RobotAnimator from "./RobotAnimator"
|
|
|
6
6
|
|
|
7
7
|
export function UniversalRobots_UR3e({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -22,7 +22,7 @@ export function UniversalRobots_UR3e({
|
|
|
22
22
|
return (
|
|
23
23
|
<>
|
|
24
24
|
<RobotAnimator
|
|
25
|
-
|
|
25
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
26
|
robotRootObjectName="Scene"
|
|
27
27
|
onRotationChanged={setRotation}
|
|
28
28
|
/>
|
|
@@ -6,7 +6,7 @@ import RobotAnimator from "./RobotAnimator"
|
|
|
6
6
|
|
|
7
7
|
export function UniversalRobots_UR5({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -21,7 +21,7 @@ export function UniversalRobots_UR5({
|
|
|
21
21
|
return (
|
|
22
22
|
<>
|
|
23
23
|
<RobotAnimator
|
|
24
|
-
|
|
24
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
25
25
|
robotRootObjectName="Scene"
|
|
26
26
|
onRotationChanged={setRotation}
|
|
27
27
|
/>
|
|
@@ -6,7 +6,7 @@ import RobotAnimator from "./RobotAnimator"
|
|
|
6
6
|
|
|
7
7
|
export function UniversalRobots_UR5e({
|
|
8
8
|
modelURL,
|
|
9
|
-
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
10
|
...props
|
|
11
11
|
}: RobotProps) {
|
|
12
12
|
const gltf = useGLTF(modelURL) as any
|
|
@@ -22,7 +22,7 @@ export function UniversalRobots_UR5e({
|
|
|
22
22
|
return (
|
|
23
23
|
<>
|
|
24
24
|
<RobotAnimator
|
|
25
|
-
|
|
25
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
26
|
robotRootObjectName="Scene"
|
|
27
27
|
onRotationChanged={setRotation}
|
|
28
28
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function Yaskawa_AR1440({
|
|
7
|
+
export function Yaskawa_AR1440({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
|
|
10
14
|
const nodes = gltf.nodes
|
|
@@ -23,7 +27,7 @@ export function Yaskawa_AR1440({ modelURL, connectedMotionGroup, ...props }: Rob
|
|
|
23
27
|
return (
|
|
24
28
|
<>
|
|
25
29
|
<RobotAnimator
|
|
26
|
-
|
|
30
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
27
31
|
robotRootObjectName="Scene"
|
|
28
32
|
onRotationChanged={setRotation}
|
|
29
33
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function Yaskawa_AR1730({
|
|
7
|
+
export function Yaskawa_AR1730({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
|
|
10
14
|
const nodes = gltf.nodes
|
|
@@ -23,7 +27,7 @@ export function Yaskawa_AR1730({ modelURL, connectedMotionGroup, ...props }: Rob
|
|
|
23
27
|
return (
|
|
24
28
|
<>
|
|
25
29
|
<RobotAnimator
|
|
26
|
-
|
|
30
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
27
31
|
robotRootObjectName="Scene"
|
|
28
32
|
onRotationChanged={setRotation}
|
|
29
33
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function Yaskawa_AR2010({
|
|
7
|
+
export function Yaskawa_AR2010({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
const nodes = gltf.nodes
|
|
10
14
|
const materials = gltf.materials
|
|
@@ -22,7 +26,7 @@ export function Yaskawa_AR2010({ modelURL, connectedMotionGroup, ...props }: Rob
|
|
|
22
26
|
return (
|
|
23
27
|
<>
|
|
24
28
|
<RobotAnimator
|
|
25
|
-
|
|
29
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
26
30
|
robotRootObjectName="Scene"
|
|
27
31
|
onRotationChanged={setRotation}
|
|
28
32
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import RobotAnimator from "./RobotAnimator"
|
|
5
5
|
import { animated } from "@react-spring/three"
|
|
6
6
|
|
|
7
|
-
export function Yaskawa_AR3120({
|
|
7
|
+
export function Yaskawa_AR3120({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
|
|
10
14
|
const nodes = gltf.nodes
|
|
@@ -23,7 +27,7 @@ export function Yaskawa_AR3120({ modelURL, connectedMotionGroup, ...props }: Rob
|
|
|
23
27
|
return (
|
|
24
28
|
<>
|
|
25
29
|
<RobotAnimator
|
|
26
|
-
|
|
30
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
27
31
|
robotRootObjectName="Scene"
|
|
28
32
|
onRotationChanged={setRotation}
|
|
29
33
|
/>
|
|
@@ -4,7 +4,11 @@ import type { RobotProps } from "./SupportedRobot"
|
|
|
4
4
|
import { animated } from "@react-spring/three"
|
|
5
5
|
import RobotAnimator from "./RobotAnimator"
|
|
6
6
|
|
|
7
|
-
export function Yaskawa_AR900({
|
|
7
|
+
export function Yaskawa_AR900({
|
|
8
|
+
modelURL,
|
|
9
|
+
rapidlyChangingMotionState,
|
|
10
|
+
...props
|
|
11
|
+
}: RobotProps) {
|
|
8
12
|
const gltf = useGLTF(modelURL) as any
|
|
9
13
|
const nodes = gltf.nodes
|
|
10
14
|
const materials = gltf.materials
|
|
@@ -20,7 +24,7 @@ export function Yaskawa_AR900({ modelURL, connectedMotionGroup, ...props }: Robo
|
|
|
20
24
|
return (
|
|
21
25
|
<>
|
|
22
26
|
<RobotAnimator
|
|
23
|
-
|
|
27
|
+
rapidlyChangingMotionState={rapidlyChangingMotionState}
|
|
24
28
|
robotRootObjectName="Scene"
|
|
25
29
|
onRotationChanged={setRotation}
|
|
26
30
|
/>
|
package/src/index.ts
CHANGED