@viamrobotics/motion-tools 1.10.0 → 1.11.1
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 +0 -3
- package/dist/HoverUpdater.svelte.js +8 -50
- 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 +3 -2
- 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/Focus.svelte +1 -8
- package/dist/components/Frame.svelte +1 -1
- package/dist/components/Geometry.svelte +112 -71
- package/dist/components/Geometry.svelte.d.ts +6 -7
- package/dist/components/Lasso/Lasso.svelte +153 -0
- package/dist/components/Lasso/Lasso.svelte.d.ts +6 -0
- package/dist/components/Lasso/Line.svelte +44 -0
- package/dist/components/Lasso/Line.svelte.d.ts +11 -0
- package/dist/components/PointerMissBox.svelte +0 -1
- package/dist/components/Points.svelte +1 -1
- package/dist/components/Scene.svelte +3 -6
- package/dist/components/SceneProviders.svelte +2 -0
- package/dist/components/Snapshot.svelte +1 -1
- package/dist/components/Snapshot.svelte.d.ts +1 -1
- package/dist/components/hover/HoveredEntityTooltip.svelte +2 -1
- package/dist/components/overlay/Details.svelte +20 -0
- package/dist/components/overlay/left-pane/TreeContainer.svelte +0 -2
- package/dist/components/overlay/settings/Settings.svelte +51 -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 +194 -47
- package/dist/components/xr/CameraFeed.svelte.d.ts +8 -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 +212 -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 +86 -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/traits.d.ts +9 -0
- package/dist/ecs/traits.js +9 -0
- 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 +46 -35
- package/dist/hooks/useObjectEvents.svelte.js +24 -7
- package/dist/hooks/usePartConfig.svelte.d.ts +0 -35
- package/dist/hooks/usePartConfig.svelte.js +2 -2
- package/dist/hooks/usePointcloudObjects.svelte.js +44 -63
- package/dist/hooks/usePointclouds.svelte.js +10 -6
- package/dist/hooks/usePose.svelte.js +4 -1
- 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/plugins/bvh.svelte.d.ts +8 -0
- package/dist/plugins/bvh.svelte.js +69 -0
- package/dist/ply.d.ts +1 -1
- package/dist/ply.js +5 -0
- 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/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/{BentPlaneGeometry.svelte → xr/BentPlaneGeometry.svelte} +0 -0
- /package/dist/components/{BentPlaneGeometry.svelte.d.ts → xr/BentPlaneGeometry.svelte.d.ts} +0 -0
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { Vector3 } from 'three';
|
|
2
1
|
import type { Entity } from 'koota';
|
|
3
2
|
import type { IntersectionEvent } from '@threlte/extras';
|
|
4
3
|
export interface HoverInfo {
|
|
@@ -11,8 +10,6 @@ export interface HoverInfo {
|
|
|
11
10
|
oZ: number;
|
|
12
11
|
theta: number;
|
|
13
12
|
}
|
|
14
|
-
export declare const getClosestArrow: (positions: Float32Array, point: Vector3) => HoverInfo;
|
|
15
|
-
export declare const getClosestPoint: (positions: Float32Array, point: Vector3) => HoverInfo;
|
|
16
13
|
export declare const getPointAtIndex: (positions: Float32Array, index: number) => HoverInfo | null;
|
|
17
14
|
export declare const getArrowAtIndex: (positions: Float32Array, index: number) => HoverInfo | null;
|
|
18
15
|
export declare const updateHoverInfo: (entity: Entity, hoverEvent: IntersectionEvent<MouseEvent>) => HoverInfo | null;
|
|
@@ -1,54 +1,6 @@
|
|
|
1
1
|
import { Vector3 } from 'three';
|
|
2
2
|
import { traits } from './ecs';
|
|
3
3
|
const hoverPosition = new Vector3();
|
|
4
|
-
export const getClosestArrow = (positions, point) => {
|
|
5
|
-
let smallestDistance = Infinity;
|
|
6
|
-
let index = -1;
|
|
7
|
-
for (let i = 0; i < positions.length; i += 6) {
|
|
8
|
-
const x = positions[i] / 1000;
|
|
9
|
-
const y = positions[i + 1] / 1000;
|
|
10
|
-
const z = positions[i + 2] / 1000;
|
|
11
|
-
const distance = point.distanceToSquared({ x, y, z });
|
|
12
|
-
if (distance < smallestDistance) {
|
|
13
|
-
smallestDistance = distance;
|
|
14
|
-
index = i;
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
return {
|
|
18
|
-
index: Math.floor(index / 6),
|
|
19
|
-
x: positions[index] / 1000,
|
|
20
|
-
y: positions[index + 1] / 1000,
|
|
21
|
-
z: positions[index + 2] / 1000,
|
|
22
|
-
oX: positions[index + 3],
|
|
23
|
-
oY: positions[index + 4],
|
|
24
|
-
oZ: positions[index + 5],
|
|
25
|
-
theta: 0,
|
|
26
|
-
};
|
|
27
|
-
};
|
|
28
|
-
export const getClosestPoint = (positions, point) => {
|
|
29
|
-
let smallestDistance = Infinity;
|
|
30
|
-
let index = -1;
|
|
31
|
-
for (let i = 0; i < positions.length; i += 3) {
|
|
32
|
-
const x = positions[i];
|
|
33
|
-
const y = positions[i + 1];
|
|
34
|
-
const z = positions[i + 2];
|
|
35
|
-
const distance = point.distanceToSquared({ x, y, z });
|
|
36
|
-
if (distance < smallestDistance) {
|
|
37
|
-
smallestDistance = distance;
|
|
38
|
-
index = i;
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
return {
|
|
42
|
-
index: Math.floor(index / 3),
|
|
43
|
-
x: positions[index],
|
|
44
|
-
y: positions[index + 1],
|
|
45
|
-
z: positions[index + 2],
|
|
46
|
-
oX: 0,
|
|
47
|
-
oY: 0,
|
|
48
|
-
oZ: 0,
|
|
49
|
-
theta: 0,
|
|
50
|
-
};
|
|
51
|
-
};
|
|
52
4
|
export const getPointAtIndex = (positions, index) => {
|
|
53
5
|
if (index < 0 || index >= positions.length / 3) {
|
|
54
6
|
return null;
|
|
@@ -87,14 +39,20 @@ export const updateHoverInfo = (entity, hoverEvent) => {
|
|
|
87
39
|
hoverPosition.set(point.x, point.y, point.z);
|
|
88
40
|
let hoverInfo = null;
|
|
89
41
|
if (entity.has(traits.Arrows)) {
|
|
90
|
-
|
|
42
|
+
let closestArrow = null;
|
|
43
|
+
if (index && index > 0) {
|
|
44
|
+
closestArrow = getArrowAtIndex(entity.get(traits.Positions), index);
|
|
45
|
+
}
|
|
91
46
|
if (closestArrow) {
|
|
92
47
|
hoverInfo = closestArrow;
|
|
93
48
|
}
|
|
94
49
|
}
|
|
95
50
|
else if (entity.has(traits.Points)) {
|
|
96
51
|
const positions = entity.get(traits.BufferGeometry)?.attributes.position.array;
|
|
97
|
-
|
|
52
|
+
let closestPoint = null;
|
|
53
|
+
if (index && index > 0) {
|
|
54
|
+
closestPoint = getPointAtIndex(positions, index);
|
|
55
|
+
}
|
|
98
56
|
if (closestPoint) {
|
|
99
57
|
hoverInfo = closestPoint;
|
|
100
58
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import type { PlainMessage, Struct } from '@viamrobotics/sdk';
|
|
2
|
+
import { BatchedMesh, Color, Vector3 } from 'three';
|
|
3
|
+
import type { GLTF } from 'three/examples/jsm/Addons.js';
|
|
4
|
+
import type { OBB } from 'three/addons/math/OBB.js';
|
|
5
|
+
declare enum SupportedShapes {
|
|
6
|
+
points = "points",
|
|
7
|
+
line = "line",
|
|
8
|
+
arrow = "arrow"
|
|
9
|
+
}
|
|
10
|
+
type Metadata = {
|
|
11
|
+
colors?: Float32Array<ArrayBufferLike>;
|
|
12
|
+
color?: Color;
|
|
13
|
+
opacity?: number;
|
|
14
|
+
gltf?: GLTF;
|
|
15
|
+
points?: Vector3[];
|
|
16
|
+
pointSize?: number;
|
|
17
|
+
lineWidth?: number;
|
|
18
|
+
lineDotColor?: Color;
|
|
19
|
+
batched?: {
|
|
20
|
+
id: number;
|
|
21
|
+
object: BatchedMesh;
|
|
22
|
+
};
|
|
23
|
+
shape?: SupportedShapes;
|
|
24
|
+
getBoundingBoxAt?: (box: OBB) => void;
|
|
25
|
+
};
|
|
26
|
+
export declare const parseMetadata: (fields?: PlainMessage<Struct>["fields"]) => Metadata;
|
|
27
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import { BatchedMesh, Color,
|
|
2
|
-
import { createPose } from './transform';
|
|
1
|
+
import { BatchedMesh, Color, Vector3 } from 'three';
|
|
3
2
|
import { isColorRepresentation, isRGB, parseColor, parseOpacity, parseRGB } from './color';
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
3
|
+
var SupportedShapes;
|
|
4
|
+
(function (SupportedShapes) {
|
|
5
|
+
SupportedShapes["points"] = "points";
|
|
6
|
+
SupportedShapes["line"] = "line";
|
|
7
|
+
SupportedShapes["arrow"] = "arrow";
|
|
8
|
+
})(SupportedShapes || (SupportedShapes = {}));
|
|
9
9
|
const METADATA_KEYS = [
|
|
10
10
|
'colors',
|
|
11
11
|
'color',
|
|
@@ -18,50 +18,9 @@ const METADATA_KEYS = [
|
|
|
18
18
|
'batched',
|
|
19
19
|
'shape',
|
|
20
20
|
];
|
|
21
|
-
|
|
21
|
+
const isMetadataKey = (key) => {
|
|
22
22
|
return METADATA_KEYS.includes(key);
|
|
23
23
|
};
|
|
24
|
-
export class WorldObject {
|
|
25
|
-
uuid = MathUtils.generateUUID();
|
|
26
|
-
name = '';
|
|
27
|
-
referenceFrame = $state.raw();
|
|
28
|
-
pose = $state.raw(createPose());
|
|
29
|
-
geometry = $state();
|
|
30
|
-
metadata = $state({});
|
|
31
|
-
localEditedPose = $state.raw(createPose());
|
|
32
|
-
constructor(name = '', pose, parent = 'world', geometry, metadata) {
|
|
33
|
-
this.name = name;
|
|
34
|
-
this.referenceFrame = parent;
|
|
35
|
-
this.geometry = geometry;
|
|
36
|
-
if (metadata) {
|
|
37
|
-
this.metadata = metadata;
|
|
38
|
-
}
|
|
39
|
-
if (pose) {
|
|
40
|
-
this.pose = pose;
|
|
41
|
-
this.localEditedPose = { ...pose };
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
toJSON() {
|
|
45
|
-
return {
|
|
46
|
-
uuid: this.uuid,
|
|
47
|
-
name: this.name,
|
|
48
|
-
referenceFrame: $state.snapshot(this.referenceFrame),
|
|
49
|
-
pose: $state.snapshot(this.pose),
|
|
50
|
-
geometry: $state.snapshot(this.geometry),
|
|
51
|
-
localEditedPose: $state.snapshot(this.localEditedPose),
|
|
52
|
-
};
|
|
53
|
-
}
|
|
54
|
-
fromJSON(json) {
|
|
55
|
-
this.uuid = json.uuid;
|
|
56
|
-
this.name = json.name;
|
|
57
|
-
this.referenceFrame = json.referenceFrame;
|
|
58
|
-
this.pose = json.pose;
|
|
59
|
-
this.geometry = json.geometry;
|
|
60
|
-
this.localEditedPose = json.localEditedPose;
|
|
61
|
-
this.metadata = {};
|
|
62
|
-
return this;
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
24
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
66
25
|
const unwrapValue = (value) => {
|
|
67
26
|
if (!value?.kind)
|
|
@@ -153,9 +112,3 @@ const readColor = (color) => {
|
|
|
153
112
|
return parseRGB(color);
|
|
154
113
|
return new Color('black');
|
|
155
114
|
};
|
|
156
|
-
export const fromTransform = (transform) => {
|
|
157
|
-
const metadata = transform.metadata ? parseMetadata(transform.metadata.fields) : {};
|
|
158
|
-
const worldObject = new WorldObject(transform.referenceFrame, transform.poseInObserverFrame?.pose, transform.poseInObserverFrame?.referenceFrame, transform.physicalObject, metadata);
|
|
159
|
-
worldObject.uuid = transform.uuidString;
|
|
160
|
-
return worldObject;
|
|
161
|
-
};
|
|
@@ -221,6 +221,12 @@ export declare class Nurbs extends Message<Nurbs> {
|
|
|
221
221
|
* @generated from field: optional bytes weights = 4;
|
|
222
222
|
*/
|
|
223
223
|
weights?: Uint8Array;
|
|
224
|
+
/**
|
|
225
|
+
* optional width of the line in millimeters, defaults to 5
|
|
226
|
+
*
|
|
227
|
+
* @generated from field: optional float line_width = 5;
|
|
228
|
+
*/
|
|
229
|
+
lineWidth?: number;
|
|
224
230
|
constructor(data?: PartialMessage<Nurbs>);
|
|
225
231
|
static readonly runtime: typeof proto3;
|
|
226
232
|
static readonly typeName = "draw.v1.Nurbs";
|
|
@@ -278,6 +278,12 @@ export class Nurbs extends Message {
|
|
|
278
278
|
* @generated from field: optional bytes weights = 4;
|
|
279
279
|
*/
|
|
280
280
|
weights;
|
|
281
|
+
/**
|
|
282
|
+
* optional width of the line in millimeters, defaults to 5
|
|
283
|
+
*
|
|
284
|
+
* @generated from field: optional float line_width = 5;
|
|
285
|
+
*/
|
|
286
|
+
lineWidth;
|
|
281
287
|
constructor(data) {
|
|
282
288
|
super();
|
|
283
289
|
proto3.util.initPartial(data, this);
|
|
@@ -289,6 +295,7 @@ export class Nurbs extends Message {
|
|
|
289
295
|
{ no: 2, name: "knots", kind: "scalar", T: 12 /* ScalarType.BYTES */ },
|
|
290
296
|
{ no: 3, name: "degree", kind: "scalar", T: 5 /* ScalarType.INT32 */, opt: true },
|
|
291
297
|
{ no: 4, name: "weights", kind: "scalar", T: 12 /* ScalarType.BYTES */, opt: true },
|
|
298
|
+
{ no: 5, name: "line_width", kind: "scalar", T: 2 /* ScalarType.FLOAT */, opt: true },
|
|
292
299
|
]);
|
|
293
300
|
static fromBinary(bytes, options) {
|
|
294
301
|
return new Nurbs().fromBinary(bytes, options);
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
import { AddEntityRequest, AddEntityResponse, RemoveAllDrawingsRequest, RemoveAllDrawingsResponse, RemoveAllRequest, RemoveAllResponse, RemoveAllTransformsRequest, RemoveAllTransformsResponse, RemoveEntityRequest, RemoveEntityResponse, SetSceneMetadataRequest, SetSceneMetadataResponse, StreamDrawingChangesRequest, StreamDrawingChangesResponse, StreamSceneChangesRequest, StreamSceneChangesResponse, StreamTransformChangesRequest, StreamTransformChangesResponse, UpdateEntityRequest, UpdateEntityResponse } from "./service_pb";
|
|
2
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
3
|
+
/**
|
|
4
|
+
* DrawService provides visualization APIs for managing transforms and custom drawing primitives
|
|
5
|
+
*
|
|
6
|
+
* @generated from service draw.v1.DrawService
|
|
7
|
+
*/
|
|
8
|
+
export declare const DrawService: {
|
|
9
|
+
readonly typeName: "draw.v1.DrawService";
|
|
10
|
+
readonly methods: {
|
|
11
|
+
/**
|
|
12
|
+
* Add an entity to the scene.
|
|
13
|
+
*
|
|
14
|
+
* @generated from rpc draw.v1.DrawService.AddEntity
|
|
15
|
+
*/
|
|
16
|
+
readonly addEntity: {
|
|
17
|
+
readonly name: "AddEntity";
|
|
18
|
+
readonly I: typeof AddEntityRequest;
|
|
19
|
+
readonly O: typeof AddEntityResponse;
|
|
20
|
+
readonly kind: MethodKind.Unary;
|
|
21
|
+
};
|
|
22
|
+
/**
|
|
23
|
+
* Update an entity in the scene.
|
|
24
|
+
*
|
|
25
|
+
* @generated from rpc draw.v1.DrawService.UpdateEntity
|
|
26
|
+
*/
|
|
27
|
+
readonly updateEntity: {
|
|
28
|
+
readonly name: "UpdateEntity";
|
|
29
|
+
readonly I: typeof UpdateEntityRequest;
|
|
30
|
+
readonly O: typeof UpdateEntityResponse;
|
|
31
|
+
readonly kind: MethodKind.Unary;
|
|
32
|
+
};
|
|
33
|
+
/**
|
|
34
|
+
* Remove an entity from the scene.
|
|
35
|
+
*
|
|
36
|
+
* @generated from rpc draw.v1.DrawService.RemoveEntity
|
|
37
|
+
*/
|
|
38
|
+
readonly removeEntity: {
|
|
39
|
+
readonly name: "RemoveEntity";
|
|
40
|
+
readonly I: typeof RemoveEntityRequest;
|
|
41
|
+
readonly O: typeof RemoveEntityResponse;
|
|
42
|
+
readonly kind: MethodKind.Unary;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* Set the camera and/or metadata for the scene.
|
|
46
|
+
*
|
|
47
|
+
* @generated from rpc draw.v1.DrawService.SetSceneMetadata
|
|
48
|
+
*/
|
|
49
|
+
readonly setSceneMetadata: {
|
|
50
|
+
readonly name: "SetSceneMetadata";
|
|
51
|
+
readonly I: typeof SetSceneMetadataRequest;
|
|
52
|
+
readonly O: typeof SetSceneMetadataResponse;
|
|
53
|
+
readonly kind: MethodKind.Unary;
|
|
54
|
+
};
|
|
55
|
+
/**
|
|
56
|
+
* Stream changes to the transforms in the scene.
|
|
57
|
+
*
|
|
58
|
+
* @generated from rpc draw.v1.DrawService.StreamTransformChanges
|
|
59
|
+
*/
|
|
60
|
+
readonly streamTransformChanges: {
|
|
61
|
+
readonly name: "StreamTransformChanges";
|
|
62
|
+
readonly I: typeof StreamTransformChangesRequest;
|
|
63
|
+
readonly O: typeof StreamTransformChangesResponse;
|
|
64
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
65
|
+
};
|
|
66
|
+
/**
|
|
67
|
+
* Stream changes to the drawings in the scene.
|
|
68
|
+
*
|
|
69
|
+
* @generated from rpc draw.v1.DrawService.StreamDrawingChanges
|
|
70
|
+
*/
|
|
71
|
+
readonly streamDrawingChanges: {
|
|
72
|
+
readonly name: "StreamDrawingChanges";
|
|
73
|
+
readonly I: typeof StreamDrawingChangesRequest;
|
|
74
|
+
readonly O: typeof StreamDrawingChangesResponse;
|
|
75
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
76
|
+
};
|
|
77
|
+
/**
|
|
78
|
+
* Stream changes to the camera and/or metadata for the scene.
|
|
79
|
+
*
|
|
80
|
+
* @generated from rpc draw.v1.DrawService.StreamSceneChanges
|
|
81
|
+
*/
|
|
82
|
+
readonly streamSceneChanges: {
|
|
83
|
+
readonly name: "StreamSceneChanges";
|
|
84
|
+
readonly I: typeof StreamSceneChangesRequest;
|
|
85
|
+
readonly O: typeof StreamSceneChangesResponse;
|
|
86
|
+
readonly kind: MethodKind.ServerStreaming;
|
|
87
|
+
};
|
|
88
|
+
/**
|
|
89
|
+
* Remove all transforms from the scene.
|
|
90
|
+
*
|
|
91
|
+
* @generated from rpc draw.v1.DrawService.RemoveAllTransforms
|
|
92
|
+
*/
|
|
93
|
+
readonly removeAllTransforms: {
|
|
94
|
+
readonly name: "RemoveAllTransforms";
|
|
95
|
+
readonly I: typeof RemoveAllTransformsRequest;
|
|
96
|
+
readonly O: typeof RemoveAllTransformsResponse;
|
|
97
|
+
readonly kind: MethodKind.Unary;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* Remove all drawings from the scene.
|
|
101
|
+
*
|
|
102
|
+
* @generated from rpc draw.v1.DrawService.RemoveAllDrawings
|
|
103
|
+
*/
|
|
104
|
+
readonly removeAllDrawings: {
|
|
105
|
+
readonly name: "RemoveAllDrawings";
|
|
106
|
+
readonly I: typeof RemoveAllDrawingsRequest;
|
|
107
|
+
readonly O: typeof RemoveAllDrawingsResponse;
|
|
108
|
+
readonly kind: MethodKind.Unary;
|
|
109
|
+
};
|
|
110
|
+
/**
|
|
111
|
+
* Remove all entities from the scene.
|
|
112
|
+
*
|
|
113
|
+
* @generated from rpc draw.v1.DrawService.RemoveAll
|
|
114
|
+
*/
|
|
115
|
+
readonly removeAll: {
|
|
116
|
+
readonly name: "RemoveAll";
|
|
117
|
+
readonly I: typeof RemoveAllRequest;
|
|
118
|
+
readonly O: typeof RemoveAllResponse;
|
|
119
|
+
readonly kind: MethodKind.Unary;
|
|
120
|
+
};
|
|
121
|
+
};
|
|
122
|
+
};
|
|
@@ -0,0 +1,126 @@
|
|
|
1
|
+
// @generated by protoc-gen-connect-es v1.6.1 with parameter "target=ts,import_extension=none"
|
|
2
|
+
// @generated from file draw/v1/service.proto (package draw.v1, syntax proto3)
|
|
3
|
+
/* eslint-disable */
|
|
4
|
+
// @ts-nocheck
|
|
5
|
+
import { AddEntityRequest, AddEntityResponse, RemoveAllDrawingsRequest, RemoveAllDrawingsResponse, RemoveAllRequest, RemoveAllResponse, RemoveAllTransformsRequest, RemoveAllTransformsResponse, RemoveEntityRequest, RemoveEntityResponse, SetSceneMetadataRequest, SetSceneMetadataResponse, StreamDrawingChangesRequest, StreamDrawingChangesResponse, StreamSceneChangesRequest, StreamSceneChangesResponse, StreamTransformChangesRequest, StreamTransformChangesResponse, UpdateEntityRequest, UpdateEntityResponse } from "./service_pb";
|
|
6
|
+
import { MethodKind } from "@bufbuild/protobuf";
|
|
7
|
+
/**
|
|
8
|
+
* DrawService provides visualization APIs for managing transforms and custom drawing primitives
|
|
9
|
+
*
|
|
10
|
+
* @generated from service draw.v1.DrawService
|
|
11
|
+
*/
|
|
12
|
+
export const DrawService = {
|
|
13
|
+
typeName: "draw.v1.DrawService",
|
|
14
|
+
methods: {
|
|
15
|
+
/**
|
|
16
|
+
* Add an entity to the scene.
|
|
17
|
+
*
|
|
18
|
+
* @generated from rpc draw.v1.DrawService.AddEntity
|
|
19
|
+
*/
|
|
20
|
+
addEntity: {
|
|
21
|
+
name: "AddEntity",
|
|
22
|
+
I: AddEntityRequest,
|
|
23
|
+
O: AddEntityResponse,
|
|
24
|
+
kind: MethodKind.Unary,
|
|
25
|
+
},
|
|
26
|
+
/**
|
|
27
|
+
* Update an entity in the scene.
|
|
28
|
+
*
|
|
29
|
+
* @generated from rpc draw.v1.DrawService.UpdateEntity
|
|
30
|
+
*/
|
|
31
|
+
updateEntity: {
|
|
32
|
+
name: "UpdateEntity",
|
|
33
|
+
I: UpdateEntityRequest,
|
|
34
|
+
O: UpdateEntityResponse,
|
|
35
|
+
kind: MethodKind.Unary,
|
|
36
|
+
},
|
|
37
|
+
/**
|
|
38
|
+
* Remove an entity from the scene.
|
|
39
|
+
*
|
|
40
|
+
* @generated from rpc draw.v1.DrawService.RemoveEntity
|
|
41
|
+
*/
|
|
42
|
+
removeEntity: {
|
|
43
|
+
name: "RemoveEntity",
|
|
44
|
+
I: RemoveEntityRequest,
|
|
45
|
+
O: RemoveEntityResponse,
|
|
46
|
+
kind: MethodKind.Unary,
|
|
47
|
+
},
|
|
48
|
+
/**
|
|
49
|
+
* Set the camera and/or metadata for the scene.
|
|
50
|
+
*
|
|
51
|
+
* @generated from rpc draw.v1.DrawService.SetSceneMetadata
|
|
52
|
+
*/
|
|
53
|
+
setSceneMetadata: {
|
|
54
|
+
name: "SetSceneMetadata",
|
|
55
|
+
I: SetSceneMetadataRequest,
|
|
56
|
+
O: SetSceneMetadataResponse,
|
|
57
|
+
kind: MethodKind.Unary,
|
|
58
|
+
},
|
|
59
|
+
/**
|
|
60
|
+
* Stream changes to the transforms in the scene.
|
|
61
|
+
*
|
|
62
|
+
* @generated from rpc draw.v1.DrawService.StreamTransformChanges
|
|
63
|
+
*/
|
|
64
|
+
streamTransformChanges: {
|
|
65
|
+
name: "StreamTransformChanges",
|
|
66
|
+
I: StreamTransformChangesRequest,
|
|
67
|
+
O: StreamTransformChangesResponse,
|
|
68
|
+
kind: MethodKind.ServerStreaming,
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* Stream changes to the drawings in the scene.
|
|
72
|
+
*
|
|
73
|
+
* @generated from rpc draw.v1.DrawService.StreamDrawingChanges
|
|
74
|
+
*/
|
|
75
|
+
streamDrawingChanges: {
|
|
76
|
+
name: "StreamDrawingChanges",
|
|
77
|
+
I: StreamDrawingChangesRequest,
|
|
78
|
+
O: StreamDrawingChangesResponse,
|
|
79
|
+
kind: MethodKind.ServerStreaming,
|
|
80
|
+
},
|
|
81
|
+
/**
|
|
82
|
+
* Stream changes to the camera and/or metadata for the scene.
|
|
83
|
+
*
|
|
84
|
+
* @generated from rpc draw.v1.DrawService.StreamSceneChanges
|
|
85
|
+
*/
|
|
86
|
+
streamSceneChanges: {
|
|
87
|
+
name: "StreamSceneChanges",
|
|
88
|
+
I: StreamSceneChangesRequest,
|
|
89
|
+
O: StreamSceneChangesResponse,
|
|
90
|
+
kind: MethodKind.ServerStreaming,
|
|
91
|
+
},
|
|
92
|
+
/**
|
|
93
|
+
* Remove all transforms from the scene.
|
|
94
|
+
*
|
|
95
|
+
* @generated from rpc draw.v1.DrawService.RemoveAllTransforms
|
|
96
|
+
*/
|
|
97
|
+
removeAllTransforms: {
|
|
98
|
+
name: "RemoveAllTransforms",
|
|
99
|
+
I: RemoveAllTransformsRequest,
|
|
100
|
+
O: RemoveAllTransformsResponse,
|
|
101
|
+
kind: MethodKind.Unary,
|
|
102
|
+
},
|
|
103
|
+
/**
|
|
104
|
+
* Remove all drawings from the scene.
|
|
105
|
+
*
|
|
106
|
+
* @generated from rpc draw.v1.DrawService.RemoveAllDrawings
|
|
107
|
+
*/
|
|
108
|
+
removeAllDrawings: {
|
|
109
|
+
name: "RemoveAllDrawings",
|
|
110
|
+
I: RemoveAllDrawingsRequest,
|
|
111
|
+
O: RemoveAllDrawingsResponse,
|
|
112
|
+
kind: MethodKind.Unary,
|
|
113
|
+
},
|
|
114
|
+
/**
|
|
115
|
+
* Remove all entities from the scene.
|
|
116
|
+
*
|
|
117
|
+
* @generated from rpc draw.v1.DrawService.RemoveAll
|
|
118
|
+
*/
|
|
119
|
+
removeAll: {
|
|
120
|
+
name: "RemoveAll",
|
|
121
|
+
I: RemoveAllRequest,
|
|
122
|
+
O: RemoveAllResponse,
|
|
123
|
+
kind: MethodKind.Unary,
|
|
124
|
+
},
|
|
125
|
+
}
|
|
126
|
+
};
|