@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.
Files changed (95) hide show
  1. package/dist/components/jogging/JoggingActivationRequired.d.ts +9 -0
  2. package/dist/components/jogging/JoggingActivationRequired.d.ts.map +1 -0
  3. package/dist/components/jogging/JoggingCartesianTab.d.ts.map +1 -1
  4. package/dist/components/jogging/JoggingJointTab.d.ts.map +1 -1
  5. package/dist/components/jogging/JoggingPanel.d.ts.map +1 -1
  6. package/dist/components/robots/ABB_1200_07_7.d.ts +7 -2
  7. package/dist/components/robots/ABB_1200_07_7.d.ts.map +1 -1
  8. package/dist/components/robots/DHRobot.d.ts.map +1 -1
  9. package/dist/components/robots/FANUC_ARC_Mate_100iD.d.ts +7 -2
  10. package/dist/components/robots/FANUC_ARC_Mate_100iD.d.ts.map +1 -1
  11. package/dist/components/robots/FANUC_ARC_Mate_120iD.d.ts +7 -2
  12. package/dist/components/robots/FANUC_ARC_Mate_120iD.d.ts.map +1 -1
  13. package/dist/components/robots/FANUC_CRX10iA.d.ts +7 -2
  14. package/dist/components/robots/FANUC_CRX10iA.d.ts.map +1 -1
  15. package/dist/components/robots/FANUC_CRX20iAL.d.ts +7 -2
  16. package/dist/components/robots/FANUC_CRX20iAL.d.ts.map +1 -1
  17. package/dist/components/robots/FANUC_CRX25iA.d.ts +7 -2
  18. package/dist/components/robots/FANUC_CRX25iA.d.ts.map +1 -1
  19. package/dist/components/robots/FANUC_CRX25iAL.d.ts +7 -2
  20. package/dist/components/robots/FANUC_CRX25iAL.d.ts.map +1 -1
  21. package/dist/components/robots/KUKA_KR16_R2010_2.d.ts +7 -2
  22. package/dist/components/robots/KUKA_KR16_R2010_2.d.ts.map +1 -1
  23. package/dist/components/robots/KUKA_KR210_R2700.d.ts +7 -2
  24. package/dist/components/robots/KUKA_KR210_R2700.d.ts.map +1 -1
  25. package/dist/components/robots/KUKA_KR270_R2700.d.ts +7 -2
  26. package/dist/components/robots/KUKA_KR270_R2700.d.ts.map +1 -1
  27. package/dist/components/robots/Robot.d.ts +3 -3
  28. package/dist/components/robots/Robot.d.ts.map +1 -1
  29. package/dist/components/robots/RobotAnimator.d.ts +7 -4
  30. package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
  31. package/dist/components/robots/SupportedRobot.d.ts +1 -5
  32. package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
  33. package/dist/components/robots/UniversalRobots_UR10.d.ts +2 -2
  34. package/dist/components/robots/UniversalRobots_UR10.d.ts.map +1 -1
  35. package/dist/components/robots/UniversalRobots_UR10e.d.ts +2 -2
  36. package/dist/components/robots/UniversalRobots_UR10e.d.ts.map +1 -1
  37. package/dist/components/robots/UniversalRobots_UR3.d.ts +2 -2
  38. package/dist/components/robots/UniversalRobots_UR3.d.ts.map +1 -1
  39. package/dist/components/robots/UniversalRobots_UR3e.d.ts +2 -2
  40. package/dist/components/robots/UniversalRobots_UR3e.d.ts.map +1 -1
  41. package/dist/components/robots/UniversalRobots_UR5.d.ts +2 -2
  42. package/dist/components/robots/UniversalRobots_UR5.d.ts.map +1 -1
  43. package/dist/components/robots/UniversalRobots_UR5e.d.ts +2 -2
  44. package/dist/components/robots/UniversalRobots_UR5e.d.ts.map +1 -1
  45. package/dist/components/robots/Yaskawa_AR1440.d.ts +8 -2
  46. package/dist/components/robots/Yaskawa_AR1440.d.ts.map +1 -1
  47. package/dist/components/robots/Yaskawa_AR1730.d.ts +8 -2
  48. package/dist/components/robots/Yaskawa_AR1730.d.ts.map +1 -1
  49. package/dist/components/robots/Yaskawa_AR2010.d.ts +8 -2
  50. package/dist/components/robots/Yaskawa_AR2010.d.ts.map +1 -1
  51. package/dist/components/robots/Yaskawa_AR3120.d.ts +8 -2
  52. package/dist/components/robots/Yaskawa_AR3120.d.ts.map +1 -1
  53. package/dist/components/robots/Yaskawa_AR900.d.ts +7 -2
  54. package/dist/components/robots/Yaskawa_AR900.d.ts.map +1 -1
  55. package/dist/components/robots/Yaskawa_GP50.d.ts +7 -2
  56. package/dist/components/robots/Yaskawa_GP50.d.ts.map +1 -1
  57. package/dist/components/robots/types.d.ts +17 -0
  58. package/dist/components/robots/types.d.ts.map +1 -0
  59. package/dist/index.cjs +32 -32
  60. package/dist/index.cjs.map +1 -1
  61. package/dist/index.js +9370 -9717
  62. package/dist/index.js.map +1 -1
  63. package/package.json +1 -1
  64. package/src/components/TransparentOverlay.tsx +2 -2
  65. package/src/components/jogging/JoggingActivationRequired.tsx +46 -0
  66. package/src/components/jogging/JoggingCartesianTab.tsx +84 -79
  67. package/src/components/jogging/JoggingJointTab.tsx +66 -61
  68. package/src/components/jogging/JoggingPanel.tsx +1 -32
  69. package/src/components/robots/ABB_1200_07_7.tsx +7 -22
  70. package/src/components/robots/DHRobot.tsx +34 -33
  71. package/src/components/robots/FANUC_ARC_Mate_100iD.tsx +7 -22
  72. package/src/components/robots/FANUC_ARC_Mate_120iD.tsx +7 -22
  73. package/src/components/robots/FANUC_CRX10iA.tsx +7 -22
  74. package/src/components/robots/FANUC_CRX20iAL.tsx +7 -22
  75. package/src/components/robots/FANUC_CRX25iA.tsx +7 -22
  76. package/src/components/robots/FANUC_CRX25iAL.tsx +7 -22
  77. package/src/components/robots/KUKA_KR16_R2010_2.tsx +19 -34
  78. package/src/components/robots/KUKA_KR210_R2700.tsx +7 -23
  79. package/src/components/robots/KUKA_KR270_R2700.tsx +7 -23
  80. package/src/components/robots/Robot.tsx +3 -3
  81. package/src/components/robots/RobotAnimator.tsx +32 -21
  82. package/src/components/robots/SupportedRobot.tsx +93 -103
  83. package/src/components/robots/UniversalRobots_UR10.tsx +3 -20
  84. package/src/components/robots/UniversalRobots_UR10e.tsx +2 -19
  85. package/src/components/robots/UniversalRobots_UR3.tsx +2 -19
  86. package/src/components/robots/UniversalRobots_UR3e.tsx +3 -20
  87. package/src/components/robots/UniversalRobots_UR5.tsx +3 -20
  88. package/src/components/robots/UniversalRobots_UR5e.tsx +3 -20
  89. package/src/components/robots/Yaskawa_AR1440.tsx +8 -24
  90. package/src/components/robots/Yaskawa_AR1730.tsx +8 -24
  91. package/src/components/robots/Yaskawa_AR2010.tsx +8 -24
  92. package/src/components/robots/Yaskawa_AR3120.tsx +8 -24
  93. package/src/components/robots/Yaskawa_AR900.tsx +7 -22
  94. package/src/components/robots/Yaskawa_GP50.tsx +7 -24
  95. 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 RobotAnimator from "./RobotAnimator"
2
+ import { useGLTF } from "@react-three/drei"
3
+ import type { RobotModelProps } from "./types"
6
4
 
7
- export function Yaskawa_AR900({
8
- modelURL,
9
- rapidlyChangingMotionState,
10
- ...props
11
- }: RobotProps) {
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
- export function Yaskawa_GP50({
8
- modelURL,
9
- rapidlyChangingMotionState,
10
- ...props
11
- }: RobotProps) {
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
+ }