@viamrobotics/motion-tools 1.9.1 → 1.11.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/HoverUpdater.svelte.d.ts +16 -0
- package/dist/HoverUpdater.svelte.js +78 -0
- package/dist/WorldObject.svelte.d.ts +27 -0
- package/dist/WorldObject.svelte.js +8 -55
- package/dist/{draw → buf/draw}/v1/drawing_pb.d.ts +6 -0
- package/dist/{draw → buf/draw}/v1/drawing_pb.js +7 -0
- package/dist/buf/draw/v1/service_connect.d.ts +122 -0
- package/dist/buf/draw/v1/service_connect.js +126 -0
- package/dist/buf/draw/v1/service_pb.d.ts +382 -0
- package/dist/buf/draw/v1/service_pb.js +612 -0
- package/dist/components/App.svelte +28 -30
- package/dist/components/Arrows/Arrows.svelte +16 -3
- package/dist/components/FileDrop/file-dropper.d.ts +1 -1
- package/dist/components/FileDrop/snapshot-dropper.js +1 -1
- package/dist/components/FileDrop/useFileDrop.svelte.d.ts +2 -1
- package/dist/components/Frame.svelte +1 -1
- package/dist/components/Geometry.svelte +113 -71
- package/dist/components/Geometry.svelte.d.ts +6 -7
- package/dist/components/MeasureTool/MeasurePoint.svelte +3 -3
- package/dist/components/MeasureTool/MeasureTool.svelte +6 -6
- package/dist/components/SceneProviders.svelte +4 -0
- package/dist/components/Snapshot.svelte +1 -1
- package/dist/components/Snapshot.svelte.d.ts +1 -1
- package/dist/components/hover/HoveredEntities.svelte +23 -0
- package/dist/components/hover/HoveredEntity.svelte +15 -0
- package/dist/components/hover/HoveredEntity.svelte.d.ts +3 -0
- package/dist/components/hover/HoveredEntityTooltip.svelte +70 -0
- package/dist/components/{HoveredEntityTooltip.svelte.d.ts → hover/HoveredEntityTooltip.svelte.d.ts} +2 -2
- package/dist/components/hover/LinkedHoveredEntity.svelte +55 -0
- package/dist/components/hover/LinkedHoveredEntity.svelte.d.ts +9 -0
- package/dist/components/overlay/AddRelationship.svelte +131 -0
- package/dist/components/overlay/AddRelationship.svelte.d.ts +7 -0
- package/dist/components/overlay/Details.svelte +55 -2
- package/dist/components/overlay/FloatingPanel.svelte +78 -0
- package/dist/components/overlay/FloatingPanel.svelte.d.ts +13 -0
- package/dist/components/overlay/{left-pane/RefreshRate.svelte → RefreshRate.svelte} +1 -1
- package/dist/components/overlay/ToggleGroup.svelte +22 -26
- package/dist/components/overlay/ToggleGroup.svelte.d.ts +6 -7
- package/dist/components/overlay/left-pane/TreeContainer.svelte +0 -4
- package/dist/components/overlay/settings/Settings.svelte +330 -0
- package/dist/components/overlay/settings/Tabs.svelte +54 -0
- package/dist/components/overlay/settings/Tabs.svelte.d.ts +12 -0
- package/dist/components/overlay/widgets/Camera.svelte +20 -12
- package/dist/components/xr/ArmTeleop.svelte +469 -0
- package/dist/components/xr/ArmTeleop.svelte.d.ts +10 -0
- package/dist/components/xr/CameraFeed.svelte +191 -47
- package/dist/components/xr/CameraFeed.svelte.d.ts +7 -0
- package/dist/components/xr/Controllers.svelte +45 -38
- package/dist/components/xr/Controllers.svelte.d.ts +2 -17
- package/dist/components/xr/Hands.svelte +2 -4
- package/dist/components/xr/JointLimitsWidget.svelte +209 -0
- package/dist/components/xr/JointLimitsWidget.svelte.d.ts +13 -0
- package/dist/components/xr/OriginMarker.svelte +1 -15
- package/dist/components/xr/XR.svelte +78 -5
- package/dist/components/xr/XRConfigPanel.svelte +449 -0
- package/dist/components/xr/XRConfigPanel.svelte.d.ts +11 -0
- package/dist/components/xr/XRControllerSettings.svelte +240 -0
- package/dist/components/xr/XRControllerSettings.svelte.d.ts +3 -0
- package/dist/components/xr/XRToast.svelte +215 -0
- package/dist/components/xr/XRToast.svelte.d.ts +3 -0
- package/dist/components/xr/math.d.ts +14 -0
- package/dist/components/xr/math.js +26 -0
- package/dist/components/xr/toasts.svelte.d.ts +20 -0
- package/dist/components/xr/toasts.svelte.js +32 -0
- package/dist/components/xr/useOrigin.svelte.d.ts +2 -2
- package/dist/components/xr/useOrigin.svelte.js +4 -4
- package/dist/ecs/index.d.ts +1 -0
- package/dist/ecs/index.js +1 -0
- package/dist/ecs/relations.d.ts +7 -0
- package/dist/ecs/relations.js +7 -0
- package/dist/ecs/traits.d.ts +15 -1
- package/dist/ecs/traits.js +19 -5
- package/dist/ecs/useTrait.svelte.d.ts +3 -3
- package/dist/frame.d.ts +0 -3
- package/dist/hooks/useArmKinematics.svelte.d.ts +12 -0
- package/dist/hooks/useArmKinematics.svelte.js +31 -0
- package/dist/hooks/useGeometries.svelte.js +47 -36
- package/dist/hooks/useLinked.svelte.d.ts +7 -0
- package/dist/hooks/useLinked.svelte.js +35 -0
- package/dist/hooks/useObjectEvents.svelte.js +52 -16
- package/dist/hooks/usePartConfig.svelte.d.ts +0 -35
- package/dist/hooks/usePartConfig.svelte.js +2 -2
- package/dist/hooks/usePointcloudObjects.svelte.js +45 -64
- package/dist/hooks/usePointclouds.svelte.js +13 -9
- package/dist/hooks/usePose.svelte.js +5 -2
- package/dist/hooks/useResourceByName.svelte.d.ts +7 -0
- package/dist/hooks/useResourceByName.svelte.js +2 -2
- package/dist/hooks/useSettings.svelte.d.ts +14 -0
- package/dist/hooks/useSettings.svelte.js +10 -0
- package/dist/hooks/useWorldState.svelte.d.ts +0 -8
- package/dist/lib.d.ts +1 -3
- package/dist/lib.js +1 -3
- package/dist/snapshot.d.ts +2 -2
- package/dist/snapshot.js +2 -2
- package/dist/three/InstancedArrows/raycast.d.ts +2 -4
- package/dist/three/InstancedArrows/raycast.js +5 -5
- package/dist/transform.js +1 -0
- package/package.json +7 -5
- package/dist/assert.d.ts +0 -14
- package/dist/assert.js +0 -21
- package/dist/components/BatchedGeometry.svelte +0 -0
- package/dist/components/BatchedGeometry.svelte.d.ts +0 -26
- package/dist/components/Detections.svelte +0 -41
- package/dist/components/Detections.svelte.d.ts +0 -3
- package/dist/components/DetectionsPlane.svelte +0 -23
- package/dist/components/DetectionsPlane.svelte.d.ts +0 -21
- package/dist/components/Geometry2.svelte +0 -211
- package/dist/components/Geometry2.svelte.d.ts +0 -19
- package/dist/components/HoveredEntities.svelte +0 -19
- package/dist/components/HoveredEntityTooltip.svelte +0 -242
- package/dist/components/overlay/left-pane/Settings.svelte +0 -221
- package/dist/components/overlay/left-pane/Widgets.svelte +0 -65
- package/dist/components/overlay/left-pane/Widgets.svelte.d.ts +0 -3
- package/dist/entries.d.ts +0 -1
- package/dist/entries.js +0 -3
- package/dist/hooks/index.d.ts +0 -0
- package/dist/hooks/index.js +0 -1
- package/dist/test.d.ts +0 -1
- package/dist/test.js +0 -1
- package/dist/three/BoxHelper.d.ts +0 -50
- package/dist/three/BoxHelper.js +0 -134
- /package/dist/{common → buf/common}/v1/common_pb.d.ts +0 -0
- /package/dist/{common → buf/common}/v1/common_pb.js +0 -0
- /package/dist/{draw → buf/draw}/v1/metadata_pb.d.ts +0 -0
- /package/dist/{draw → buf/draw}/v1/metadata_pb.js +0 -0
- /package/dist/{draw → buf/draw}/v1/scene_pb.d.ts +0 -0
- /package/dist/{draw → buf/draw}/v1/scene_pb.js +0 -0
- /package/dist/{draw → buf/draw}/v1/snapshot_pb.d.ts +0 -0
- /package/dist/{draw → buf/draw}/v1/snapshot_pb.js +0 -0
- /package/dist/{draw → buf/draw}/v1/transforms_pb.d.ts +0 -0
- /package/dist/{draw → buf/draw}/v1/transforms_pb.js +0 -0
- /package/dist/components/{HoveredEntities.svelte.d.ts → hover/HoveredEntities.svelte.d.ts} +0 -0
- /package/dist/components/overlay/{left-pane/RefreshRate.svelte.d.ts → RefreshRate.svelte.d.ts} +0 -0
- /package/dist/components/overlay/{left-pane → settings}/Settings.svelte.d.ts +0 -0
- /package/dist/components/{BentPlaneGeometry.svelte → xr/BentPlaneGeometry.svelte} +0 -0
- /package/dist/components/{BentPlaneGeometry.svelte.d.ts → xr/BentPlaneGeometry.svelte.d.ts} +0 -0
package/dist/three/BoxHelper.js
DELETED
|
@@ -1,134 +0,0 @@
|
|
|
1
|
-
import { Box3, LineSegments, LineBasicMaterial, BufferAttribute, BufferGeometry, Object3D, Material, } from 'three';
|
|
2
|
-
const _box = /*@__PURE__*/ new Box3();
|
|
3
|
-
/**
|
|
4
|
-
* Helper object to graphically show the world-axis-aligned bounding box
|
|
5
|
-
* around an object. The actual bounding box is handled with {@link Box3},
|
|
6
|
-
* this is just a visual helper for debugging. It can be automatically
|
|
7
|
-
* resized with {@link BoxHelper#update} when the object it's created from
|
|
8
|
-
* is transformed. Note that the object must have a geometry for this to work,
|
|
9
|
-
* so it won't work with sprites.
|
|
10
|
-
*
|
|
11
|
-
* ```js
|
|
12
|
-
* const sphere = new THREE.SphereGeometry();
|
|
13
|
-
* const object = new THREE.Mesh( sphere, new THREE.MeshBasicMaterial( 0xff0000 ) );
|
|
14
|
-
* const box = new THREE.BoxHelper( object, 0xffff00 );
|
|
15
|
-
* scene.add( box );
|
|
16
|
-
* ```
|
|
17
|
-
*
|
|
18
|
-
* @augments LineSegments
|
|
19
|
-
*/
|
|
20
|
-
class BoxHelper extends LineSegments {
|
|
21
|
-
type = 'BoxHelper';
|
|
22
|
-
matrixAutoUpdate = false;
|
|
23
|
-
object;
|
|
24
|
-
/**
|
|
25
|
-
* Constructs a new box helper.
|
|
26
|
-
*
|
|
27
|
-
* @param {Object3D} [object] - The 3D object to show the world-axis-aligned bounding box.
|
|
28
|
-
* @param {number|Color|string} [color=0xffff00] - The box's color.
|
|
29
|
-
*/
|
|
30
|
-
constructor(object, color = 0xffff00) {
|
|
31
|
-
const indices = new Uint16Array([
|
|
32
|
-
0, 1, 1, 2, 2, 3, 3, 0, 4, 5, 5, 6, 6, 7, 7, 4, 0, 4, 1, 5, 2, 6, 3, 7,
|
|
33
|
-
]);
|
|
34
|
-
const positions = new Float32Array(8 * 3);
|
|
35
|
-
const geometry = new BufferGeometry();
|
|
36
|
-
geometry.setIndex(new BufferAttribute(indices, 1));
|
|
37
|
-
geometry.setAttribute('position', new BufferAttribute(positions, 3));
|
|
38
|
-
super(geometry, new LineBasicMaterial({ color: color, toneMapped: false }));
|
|
39
|
-
/**
|
|
40
|
-
* The 3D object being visualized.
|
|
41
|
-
*
|
|
42
|
-
* @type {Object3D}
|
|
43
|
-
*/
|
|
44
|
-
this.object = object;
|
|
45
|
-
this.update();
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Updates the helper's geometry to match the dimensions of the object,
|
|
49
|
-
* including any children.
|
|
50
|
-
*/
|
|
51
|
-
update() {
|
|
52
|
-
if (this.object !== undefined) {
|
|
53
|
-
_box.setFromObject(this.object);
|
|
54
|
-
}
|
|
55
|
-
if (_box.isEmpty())
|
|
56
|
-
return;
|
|
57
|
-
const min = _box.min;
|
|
58
|
-
const max = _box.max;
|
|
59
|
-
/*
|
|
60
|
-
5____4
|
|
61
|
-
1/___0/|
|
|
62
|
-
| 6__|_7
|
|
63
|
-
2/___3/
|
|
64
|
-
|
|
65
|
-
0: max.x, max.y, max.z
|
|
66
|
-
1: min.x, max.y, max.z
|
|
67
|
-
2: min.x, min.y, max.z
|
|
68
|
-
3: max.x, min.y, max.z
|
|
69
|
-
4: max.x, max.y, min.z
|
|
70
|
-
5: min.x, max.y, min.z
|
|
71
|
-
6: min.x, min.y, min.z
|
|
72
|
-
7: max.x, min.y, min.z
|
|
73
|
-
*/
|
|
74
|
-
const position = this.geometry.attributes.position;
|
|
75
|
-
const array = position.array;
|
|
76
|
-
array[0] = max.x;
|
|
77
|
-
array[1] = max.y;
|
|
78
|
-
array[2] = max.z;
|
|
79
|
-
array[3] = min.x;
|
|
80
|
-
array[4] = max.y;
|
|
81
|
-
array[5] = max.z;
|
|
82
|
-
array[6] = min.x;
|
|
83
|
-
array[7] = min.y;
|
|
84
|
-
array[8] = max.z;
|
|
85
|
-
array[9] = max.x;
|
|
86
|
-
array[10] = min.y;
|
|
87
|
-
array[11] = max.z;
|
|
88
|
-
array[12] = max.x;
|
|
89
|
-
array[13] = max.y;
|
|
90
|
-
array[14] = min.z;
|
|
91
|
-
array[15] = min.x;
|
|
92
|
-
array[16] = max.y;
|
|
93
|
-
array[17] = min.z;
|
|
94
|
-
array[18] = min.x;
|
|
95
|
-
array[19] = min.y;
|
|
96
|
-
array[20] = min.z;
|
|
97
|
-
array[21] = max.x;
|
|
98
|
-
array[22] = min.y;
|
|
99
|
-
array[23] = min.z;
|
|
100
|
-
position.needsUpdate = true;
|
|
101
|
-
this.geometry.computeBoundingSphere();
|
|
102
|
-
}
|
|
103
|
-
/**
|
|
104
|
-
* Updates the wireframe box for the passed object.
|
|
105
|
-
*
|
|
106
|
-
* @param {Object3D} object - The 3D object to create the helper for.
|
|
107
|
-
* @return {BoxHelper} A reference to this instance.
|
|
108
|
-
*/
|
|
109
|
-
setFromObject(object) {
|
|
110
|
-
this.object = object;
|
|
111
|
-
this.update();
|
|
112
|
-
return this;
|
|
113
|
-
}
|
|
114
|
-
setFromBox3(box) {
|
|
115
|
-
this.object = undefined;
|
|
116
|
-
_box.copy(box);
|
|
117
|
-
this.update();
|
|
118
|
-
return this;
|
|
119
|
-
}
|
|
120
|
-
copy(source, recursive) {
|
|
121
|
-
super.copy(source, recursive);
|
|
122
|
-
this.object = source.object;
|
|
123
|
-
return this;
|
|
124
|
-
}
|
|
125
|
-
/**
|
|
126
|
-
* Frees the GPU-related resources allocated by this instance. Call this
|
|
127
|
-
* method whenever this instance is no longer used in your app.
|
|
128
|
-
*/
|
|
129
|
-
dispose() {
|
|
130
|
-
this.geometry.dispose();
|
|
131
|
-
this.material.dispose();
|
|
132
|
-
}
|
|
133
|
-
}
|
|
134
|
-
export { BoxHelper };
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/components/overlay/{left-pane/RefreshRate.svelte.d.ts → RefreshRate.svelte.d.ts}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|