@wandelbots/wandelbots-js-react-components 1.17.3 → 1.17.5
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/JoggingActivationRequired.d.ts +9 -0
- package/dist/components/jogging/JoggingActivationRequired.d.ts.map +1 -0
- package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
- package/dist/components/jogging/JoggingPanel.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/index.cjs +32 -32
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +9370 -9717
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
- package/src/components/TransparentOverlay.tsx +2 -2
- package/src/components/jogging/JoggingActivationRequired.tsx +46 -0
- package/src/components/jogging/JoggingCartesianTab.tsx +84 -79
- package/src/components/jogging/JoggingJointTab.tsx +66 -61
- package/src/components/jogging/JoggingPanel.tsx +1 -32
- 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
|
@@ -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
|
+
}
|