@wandelbots/wandelbots-js-react-components 1.35.0 → 1.36.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/dist/components/jogging/JoggingOptions.d.ts.map +1 -1
- package/dist/components/jogging/PoseCartesianValues.d.ts +1 -1
- package/dist/components/jogging/PoseCartesianValues.d.ts.map +1 -1
- package/dist/components/robots/DHRobot.d.ts.map +1 -1
- package/dist/components/robots/GenericRobot.d.ts +13 -2
- package/dist/components/robots/GenericRobot.d.ts.map +1 -1
- package/dist/components/robots/Robot.d.ts.map +1 -1
- package/dist/components/robots/RobotAnimator.d.ts +3 -5
- package/dist/components/robots/RobotAnimator.d.ts.map +1 -1
- package/dist/components/robots/SupportedRobot.d.ts +4 -4
- package/dist/components/robots/SupportedRobot.d.ts.map +1 -1
- package/dist/components/robots/ghostStyle.d.ts +4 -0
- package/dist/components/robots/ghostStyle.d.ts.map +1 -0
- package/dist/components/robots/robotModelLogic.d.ts +25 -0
- package/dist/components/robots/robotModelLogic.d.ts.map +1 -0
- package/dist/index.cjs +30 -30
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3464 -3398
- package/dist/index.js.map +1 -1
- package/package.json +49 -34
- package/src/components/jogging/JoggingOptions.tsx +1 -0
- package/src/components/jogging/PoseCartesianValues.tsx +2 -4
- package/src/components/robots/DHRobot.tsx +2 -10
- package/src/components/robots/GenericRobot.tsx +30 -9
- package/src/components/robots/Robot.tsx +2 -1
- package/src/components/robots/RobotAnimator.tsx +6 -13
- package/src/components/robots/SupportedRobot.tsx +35 -111
- package/src/components/robots/ghostStyle.ts +70 -0
- package/src/components/robots/robotModelLogic.ts +90 -0
- package/src/index.ts +1 -0
- package/dist/components/robots/types.d.ts +0 -19
- package/dist/components/robots/types.d.ts.map +0 -1
- package/dist/components/utils/robotTreeQuery.d.ts +0 -6
- package/dist/components/utils/robotTreeQuery.d.ts.map +0 -1
- package/src/components/robots/types.ts +0 -21
- package/src/components/utils/robotTreeQuery.ts +0 -27
|
@@ -1,19 +0,0 @@
|
|
|
1
|
-
import type { GroupProps } from "@react-three/fiber";
|
|
2
|
-
import type { Group } from "three";
|
|
3
|
-
export type RobotModelProps = {
|
|
4
|
-
modelURL: string;
|
|
5
|
-
flangeRef?: React.Ref<Group>;
|
|
6
|
-
} & GroupProps;
|
|
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
|
-
export type RobotModelComponent = {
|
|
16
|
-
(props: RobotModelProps): JSX.Element;
|
|
17
|
-
config?: RobotModelConfig;
|
|
18
|
-
};
|
|
19
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/robots/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAA;AACpD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,OAAO,CAAA;AAElC,MAAM,MAAM,eAAe,GAAG;IAC5B,QAAQ,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,KAAK,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;CAC7B,GAAG,UAAU,CAAA;AAEd;;;GAGG;AACH,MAAM,MAAM,gBAAgB,GAAG;IAC7B,eAAe,CAAC,EAAE,MAAM,EAAE,CAAA;IAC1B,YAAY,CAAC,EAAE,MAAM,EAAE,CAAA;CACxB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG;IAChC,CAAC,KAAK,EAAE,eAAe,GAAG,GAAG,CAAC,OAAO,CAAA;IACrC,MAAM,CAAC,EAAE,gBAAgB,CAAA;CAC1B,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import type * as THREE from "three";
|
|
2
|
-
export type RobotSceneJoint = THREE.Object3D;
|
|
3
|
-
export declare const defaultJointNamePattern = "(^joint_[0-9]+$)|(_J[0-9]+$)";
|
|
4
|
-
export declare function getAllObjects(root: THREE.Object3D): THREE.Object3D[];
|
|
5
|
-
export declare function getAllJointsByName(rootObject: THREE.Object3D, jointNamePattern?: string): RobotSceneJoint[];
|
|
6
|
-
//# sourceMappingURL=robotTreeQuery.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"robotTreeQuery.d.ts","sourceRoot":"","sources":["../../../src/components/utils/robotTreeQuery.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,KAAK,MAAM,OAAO,CAAA;AAEnC,MAAM,MAAM,eAAe,GAAG,KAAK,CAAC,QAAQ,CAAA;AAE5C,eAAO,MAAM,uBAAuB,iCAAiC,CAAA;AAErE,wBAAgB,aAAa,CAAC,IAAI,EAAE,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,EAAE,CAKpE;AAQD,wBAAgB,kBAAkB,CAChC,UAAU,EAAE,KAAK,CAAC,QAAQ,EAC1B,gBAAgB,CAAC,EAAE,MAAM,GACxB,eAAe,EAAE,CAInB"}
|
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
import type { GroupProps } from "@react-three/fiber"
|
|
2
|
-
import type { Group } from "three"
|
|
3
|
-
|
|
4
|
-
export type RobotModelProps = {
|
|
5
|
-
modelURL: string
|
|
6
|
-
flangeRef?: React.Ref<Group>
|
|
7
|
-
} & GroupProps
|
|
8
|
-
|
|
9
|
-
/**
|
|
10
|
-
* Configuration needed to render a specific robot model that
|
|
11
|
-
* isn't already handled by the gltf => tsx export
|
|
12
|
-
*/
|
|
13
|
-
export type RobotModelConfig = {
|
|
14
|
-
rotationOffsets?: number[]
|
|
15
|
-
rotationSign?: number[]
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export type RobotModelComponent = {
|
|
19
|
-
(props: RobotModelProps): JSX.Element
|
|
20
|
-
config?: RobotModelConfig
|
|
21
|
-
}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import type * as THREE from "three"
|
|
2
|
-
|
|
3
|
-
export type RobotSceneJoint = THREE.Object3D
|
|
4
|
-
|
|
5
|
-
export const defaultJointNamePattern = "(^joint_[0-9]+$)|(_J[0-9]+$)"
|
|
6
|
-
|
|
7
|
-
export function getAllObjects(root: THREE.Object3D): THREE.Object3D[] {
|
|
8
|
-
if (root.children.length === 0) {
|
|
9
|
-
return [root]
|
|
10
|
-
}
|
|
11
|
-
return [root, ...root.children.flatMap((child) => getAllObjects(child))]
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
function isObjectAJointByName(name: string, jointNamePattern?: string) {
|
|
15
|
-
// e.g. abc_J05 => joint 5
|
|
16
|
-
// or joint_5 => joint 5
|
|
17
|
-
return new RegExp(jointNamePattern ?? defaultJointNamePattern).test(name)
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
export function getAllJointsByName(
|
|
21
|
-
rootObject: THREE.Object3D,
|
|
22
|
-
jointNamePattern?: string,
|
|
23
|
-
): RobotSceneJoint[] {
|
|
24
|
-
return getAllObjects(rootObject).filter((object) =>
|
|
25
|
-
isObjectAJointByName(object.name, jointNamePattern),
|
|
26
|
-
)
|
|
27
|
-
}
|