@viamrobotics/motion-tools 1.32.0 → 1.33.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/App.svelte +17 -11
- package/dist/components/App.svelte.d.ts +14 -7
- package/dist/components/Scene.svelte +40 -47
- package/dist/components/SceneProviders.svelte +0 -3
- package/dist/components/overlay/settings/ConnectionSettings.svelte +42 -0
- package/dist/components/overlay/settings/ConnectionSettings.svelte.d.ts +18 -0
- package/dist/components/overlay/settings/DebugSettings.svelte +13 -0
- package/dist/components/{xr/frame-configure/Controllers.svelte.d.ts → overlay/settings/DebugSettings.svelte.d.ts} +3 -3
- package/dist/components/overlay/settings/PointcloudSettings.svelte +61 -0
- package/dist/components/overlay/settings/PointcloudSettings.svelte.d.ts +3 -0
- package/dist/components/overlay/settings/SceneSettings.svelte +110 -0
- package/dist/components/overlay/settings/SceneSettings.svelte.d.ts +18 -0
- package/dist/components/overlay/settings/Settings.svelte +27 -312
- package/dist/components/overlay/settings/Settings.svelte.d.ts +8 -1
- package/dist/components/overlay/settings/Tabs.svelte +5 -3
- package/dist/components/overlay/settings/Tabs.svelte.d.ts +3 -3
- package/dist/components/overlay/settings/VisionSettings.svelte +31 -0
- package/dist/components/overlay/settings/VisionSettings.svelte.d.ts +3 -0
- package/dist/components/overlay/settings/WeblabSettings.svelte +27 -0
- package/dist/components/overlay/settings/WeblabSettings.svelte.d.ts +18 -0
- package/dist/components/overlay/settings/WidgetSettings.svelte +49 -0
- package/dist/components/overlay/settings/WidgetSettings.svelte.d.ts +3 -0
- package/dist/components/overlay/widgets/FramePov.svelte +1 -12
- package/dist/{components/xr → plugins/XR}/ArmTeleop.svelte +3 -5
- package/dist/plugins/XR/DebugPanel.svelte +29 -0
- package/dist/plugins/XR/DebugPanel.svelte.d.ts +3 -0
- package/dist/plugins/XR/OriginMarker.svelte +341 -0
- package/dist/plugins/XR/PendingEditsPanel.svelte +60 -0
- package/dist/plugins/XR/PendingEditsPanel.svelte.d.ts +18 -0
- package/dist/plugins/XR/WristDisplay.svelte +60 -0
- package/dist/plugins/XR/WristDisplay.svelte.d.ts +19 -0
- package/dist/{components/xr → plugins/XR}/XR.svelte +69 -23
- package/dist/plugins/XR/XRPlugins.svelte +9 -0
- package/dist/plugins/XR/XRPlugins.svelte.d.ts +26 -0
- package/dist/plugins/XR/XRSettings.svelte +240 -0
- package/dist/plugins/XR/XRSettings.svelte.d.ts +3 -0
- package/dist/{components/xr → plugins/XR}/XRToast.svelte +6 -9
- package/dist/plugins/XR/debug.svelte.d.ts +7 -0
- package/dist/plugins/XR/debug.svelte.js +13 -0
- package/dist/plugins/XR/frame-configure/Controllers.svelte +413 -0
- package/dist/plugins/XR/teleop/Controllers.svelte.d.ts +3 -0
- package/dist/{components/xr → plugins/XR}/useAnchors.svelte.d.ts +4 -0
- package/dist/{components/xr → plugins/XR}/useAnchors.svelte.js +22 -0
- package/dist/plugins/XR/useOrigin.svelte.d.ts +24 -0
- package/dist/plugins/XR/useOrigin.svelte.js +50 -0
- package/dist/plugins/index.d.ts +2 -0
- package/dist/plugins/index.js +2 -0
- package/dist/three/OBBHelper.js +1 -0
- package/package.json +1 -1
- package/dist/components/xr/OriginMarker.svelte +0 -151
- package/dist/components/xr/XRControllerSettings.svelte +0 -242
- package/dist/components/xr/XRControllerSettings.svelte.d.ts +0 -3
- package/dist/components/xr/frame-configure/Controllers.svelte +0 -6
- package/dist/components/xr/useOrigin.svelte.d.ts +0 -9
- package/dist/components/xr/useOrigin.svelte.js +0 -27
- /package/dist/{components/xr → plugins/XR}/ArmTeleop.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/BentPlaneGeometry.svelte +0 -0
- /package/dist/{components/xr → plugins/XR}/BentPlaneGeometry.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/CameraFeed.svelte +0 -0
- /package/dist/{components/xr → plugins/XR}/CameraFeed.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/JointLimitsWidget.svelte +0 -0
- /package/dist/{components/xr → plugins/XR}/JointLimitsWidget.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/OriginMarker.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/PointDistance.svelte +0 -0
- /package/dist/{components/xr → plugins/XR}/PointDistance.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/XR.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/XRConfigPanel.svelte +0 -0
- /package/dist/{components/xr → plugins/XR}/XRConfigPanel.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/XRToast.svelte.d.ts +0 -0
- /package/dist/{components/xr/teleop → plugins/XR/frame-configure}/Controllers.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/math.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/math.js +0 -0
- /package/dist/{components/xr → plugins/XR}/teleop/Controllers.svelte +0 -0
- /package/dist/{components/xr → plugins/XR}/toasts.svelte.d.ts +0 -0
- /package/dist/{components/xr → plugins/XR}/toasts.svelte.js +0 -0
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
import { useXR } from '@threlte/xr'
|
|
8
8
|
import { provideToast, ToastContainer } from '@viamrobotics/prime-core'
|
|
9
9
|
import { primeTheme } from '@viamrobotics/tweakpane-config'
|
|
10
|
-
import { onMount, type Snippet } from 'svelte'
|
|
10
|
+
import { type Component, onMount, type Snippet } from 'svelte'
|
|
11
11
|
import { ThemeUtils } from 'svelte-tweakpane-ui'
|
|
12
12
|
|
|
13
13
|
import type { FragmentInfo } from '../hooks/usePartConfig.svelte'
|
|
@@ -17,7 +17,6 @@
|
|
|
17
17
|
import Details from './overlay/Details.svelte'
|
|
18
18
|
import TreeContainer from './overlay/left-pane/TreeContainer.svelte'
|
|
19
19
|
import Settings from './overlay/settings/Settings.svelte'
|
|
20
|
-
import XR from './xr/XR.svelte'
|
|
21
20
|
import { provideWorld, traits, useQuery } from '../ecs'
|
|
22
21
|
import { type CameraPose, provideCameraControls } from '../hooks/useControls.svelte'
|
|
23
22
|
import { provideEnvironment } from '../hooks/useEnvironment.svelte'
|
|
@@ -51,7 +50,20 @@
|
|
|
51
50
|
localConfigProps?: LocalConfigProps
|
|
52
51
|
|
|
53
52
|
/**
|
|
54
|
-
*
|
|
53
|
+
* Allows adding additional tabs to the settings panel
|
|
54
|
+
*/
|
|
55
|
+
settingsTabs?: {
|
|
56
|
+
label: string
|
|
57
|
+
component: Component
|
|
58
|
+
}[]
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Allows setting the initial camera pose
|
|
62
|
+
*/
|
|
63
|
+
cameraPose?: CameraPose
|
|
64
|
+
|
|
65
|
+
/**
|
|
66
|
+
* Snippet for Three.js objects
|
|
55
67
|
*/
|
|
56
68
|
children?: Snippet
|
|
57
69
|
|
|
@@ -64,11 +76,6 @@
|
|
|
64
76
|
* Snippet to inject items into the details panel
|
|
65
77
|
*/
|
|
66
78
|
details?: Snippet<[{ entity: Entity }]>
|
|
67
|
-
|
|
68
|
-
/**
|
|
69
|
-
* Allows setting the initial camera pose
|
|
70
|
-
*/
|
|
71
|
-
cameraPose?: CameraPose
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
let {
|
|
@@ -76,6 +83,7 @@
|
|
|
76
83
|
inputBindingsEnabled = true,
|
|
77
84
|
localConfigProps,
|
|
78
85
|
cameraPose,
|
|
86
|
+
settingsTabs,
|
|
79
87
|
children: appChildren,
|
|
80
88
|
dashboard,
|
|
81
89
|
details,
|
|
@@ -124,8 +132,6 @@
|
|
|
124
132
|
{@render appChildren?.()}
|
|
125
133
|
</Scene>
|
|
126
134
|
|
|
127
|
-
<XR {@attach domPortal(root)} />
|
|
128
|
-
|
|
129
135
|
{#if settings.current.renderSubEntityHoverDetail}
|
|
130
136
|
<HoveredEntities />
|
|
131
137
|
{/if}
|
|
@@ -166,7 +172,7 @@
|
|
|
166
172
|
|
|
167
173
|
<PortalTarget id="dom" />
|
|
168
174
|
|
|
169
|
-
<Settings />
|
|
175
|
+
<Settings {settingsTabs} />
|
|
170
176
|
<Logs />
|
|
171
177
|
<AddFrames />
|
|
172
178
|
</div>
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { Struct } from '@viamrobotics/sdk';
|
|
2
2
|
import type { Entity } from 'koota';
|
|
3
|
-
import { type Snippet } from 'svelte';
|
|
3
|
+
import { type Component, type Snippet } from 'svelte';
|
|
4
4
|
import type { FragmentInfo } from '../hooks/usePartConfig.svelte';
|
|
5
5
|
import { type CameraPose } from '../hooks/useControls.svelte';
|
|
6
6
|
interface LocalConfigProps {
|
|
@@ -14,7 +14,18 @@ interface Props {
|
|
|
14
14
|
inputBindingsEnabled?: boolean;
|
|
15
15
|
localConfigProps?: LocalConfigProps;
|
|
16
16
|
/**
|
|
17
|
-
*
|
|
17
|
+
* Allows adding additional tabs to the settings panel
|
|
18
|
+
*/
|
|
19
|
+
settingsTabs?: {
|
|
20
|
+
label: string;
|
|
21
|
+
component: Component;
|
|
22
|
+
}[];
|
|
23
|
+
/**
|
|
24
|
+
* Allows setting the initial camera pose
|
|
25
|
+
*/
|
|
26
|
+
cameraPose?: CameraPose;
|
|
27
|
+
/**
|
|
28
|
+
* Snippet for Three.js objects
|
|
18
29
|
*/
|
|
19
30
|
children?: Snippet;
|
|
20
31
|
/**
|
|
@@ -27,11 +38,7 @@ interface Props {
|
|
|
27
38
|
details?: Snippet<[{
|
|
28
39
|
entity: Entity;
|
|
29
40
|
}]>;
|
|
30
|
-
/**
|
|
31
|
-
* Allows setting the initial camera pose
|
|
32
|
-
*/
|
|
33
|
-
cameraPose?: CameraPose;
|
|
34
41
|
}
|
|
35
|
-
declare const App:
|
|
42
|
+
declare const App: Component<Props, {}, "">;
|
|
36
43
|
type App = ReturnType<typeof App>;
|
|
37
44
|
export default App;
|
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
import CameraControls from './CameraControls.svelte'
|
|
20
20
|
import KeyboardBindings from './KeyboardBindings.svelte'
|
|
21
21
|
import PointerMissBox from './PointerMissBox.svelte'
|
|
22
|
-
import { useOrigin } from './xr/useOrigin.svelte'
|
|
23
22
|
|
|
24
23
|
interface Props {
|
|
25
24
|
children?: Snippet
|
|
@@ -29,7 +28,6 @@
|
|
|
29
28
|
|
|
30
29
|
const threlte = useThrelte()
|
|
31
30
|
const settings = useSettings()
|
|
32
|
-
const origin = useOrigin()
|
|
33
31
|
|
|
34
32
|
// @ts-expect-error This is for debugging
|
|
35
33
|
globalThis.__threlte__ = threlte
|
|
@@ -66,48 +64,43 @@
|
|
|
66
64
|
<KeyboardBindings />
|
|
67
65
|
<Environment url={hdrImage} />
|
|
68
66
|
|
|
69
|
-
<
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
<
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
{@render children?.()}
|
|
110
|
-
|
|
111
|
-
<T.DirectionalLight position={[3, 3, 3]} />
|
|
112
|
-
<T.AmbientLight />
|
|
113
|
-
</T.Group>
|
|
67
|
+
<PointerMissBox />
|
|
68
|
+
<SelectedTransformControls />
|
|
69
|
+
|
|
70
|
+
{#if !$isPresenting && settings.current.grid}
|
|
71
|
+
<Grid
|
|
72
|
+
oncreate={(ref) => {
|
|
73
|
+
const material = ref.material as ShaderMaterial
|
|
74
|
+
material.depthWrite = false
|
|
75
|
+
}}
|
|
76
|
+
raycast={() => null}
|
|
77
|
+
bvh={{ enabled: false }}
|
|
78
|
+
plane="xy"
|
|
79
|
+
sectionColor="#333"
|
|
80
|
+
infiniteGrid
|
|
81
|
+
renderOrder={999}
|
|
82
|
+
cellSize={settings.current.gridCellSize}
|
|
83
|
+
sectionSize={settings.current.gridSectionSize}
|
|
84
|
+
fadeOrigin={[0, 0, 0]}
|
|
85
|
+
fadeDistance={settings.current.gridFadeDistance}
|
|
86
|
+
/>
|
|
87
|
+
{/if}
|
|
88
|
+
|
|
89
|
+
{#if !$isPresenting}
|
|
90
|
+
<Camera position={[3, 3, 3]}>
|
|
91
|
+
<CameraControls />
|
|
92
|
+
</Camera>
|
|
93
|
+
{/if}
|
|
94
|
+
|
|
95
|
+
<StaticGeometries />
|
|
96
|
+
<Selected />
|
|
97
|
+
|
|
98
|
+
<PortalTarget />
|
|
99
|
+
|
|
100
|
+
<Entities />
|
|
101
|
+
<BatchedArrows />
|
|
102
|
+
|
|
103
|
+
{@render children?.()}
|
|
104
|
+
|
|
105
|
+
<T.DirectionalLight position={[3, 3, 3]} />
|
|
106
|
+
<T.AmbientLight />
|
|
@@ -21,8 +21,6 @@
|
|
|
21
21
|
import { provideResourceByName } from '../hooks/useResourceByName.svelte'
|
|
22
22
|
import { provideWorldStates } from '../hooks/useWorldState.svelte'
|
|
23
23
|
|
|
24
|
-
import { provideOrigin } from './xr/useOrigin.svelte'
|
|
25
|
-
|
|
26
24
|
interface Props {
|
|
27
25
|
children: Snippet
|
|
28
26
|
}
|
|
@@ -37,7 +35,6 @@
|
|
|
37
35
|
provideHierarchy()
|
|
38
36
|
provideWorldMatrix()
|
|
39
37
|
provideInheritedInvisible()
|
|
40
|
-
provideOrigin()
|
|
41
38
|
|
|
42
39
|
provideRelationships()
|
|
43
40
|
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { useGeometries } from '../../../hooks/useGeometries.svelte'
|
|
3
|
+
import { usePointcloudObjects } from '../../../hooks/usePointcloudObjects.svelte'
|
|
4
|
+
import { usePointClouds } from '../../../hooks/usePointclouds.svelte'
|
|
5
|
+
import { useRefetchPoses } from '../../../hooks/useRefetchPoses'
|
|
6
|
+
import { RefreshRates } from '../../../hooks/useSettings.svelte'
|
|
7
|
+
|
|
8
|
+
import RefreshRate from '../RefreshRate.svelte'
|
|
9
|
+
|
|
10
|
+
const geometries = useGeometries()
|
|
11
|
+
const pointclouds = usePointClouds()
|
|
12
|
+
const pointcloudObjects = usePointcloudObjects()
|
|
13
|
+
const { refetchPoses } = useRefetchPoses()
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<div class="flex flex-col gap-2.5 text-xs">
|
|
17
|
+
<h3 class="border-gray-3 border-b py-1 text-sm"><strong>Polling rates</strong></h3>
|
|
18
|
+
|
|
19
|
+
<RefreshRate
|
|
20
|
+
id={RefreshRates.poses}
|
|
21
|
+
label="Poses"
|
|
22
|
+
allowLive
|
|
23
|
+
onManualRefetch={() => {
|
|
24
|
+
refetchPoses()
|
|
25
|
+
geometries.refetch()
|
|
26
|
+
}}
|
|
27
|
+
/>
|
|
28
|
+
<RefreshRate
|
|
29
|
+
id={RefreshRates.pointclouds}
|
|
30
|
+
label="Pointclouds from cameras"
|
|
31
|
+
onManualRefetch={() => {
|
|
32
|
+
pointclouds.refetch()
|
|
33
|
+
}}
|
|
34
|
+
/>
|
|
35
|
+
<RefreshRate
|
|
36
|
+
id={RefreshRates.vision}
|
|
37
|
+
label="Vision service pointcloud segments and objects"
|
|
38
|
+
onManualRefetch={() => {
|
|
39
|
+
pointcloudObjects.refetch()
|
|
40
|
+
}}
|
|
41
|
+
/>
|
|
42
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const ConnectionSettings: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type ConnectionSettings = InstanceType<typeof ConnectionSettings>;
|
|
18
|
+
export default ConnectionSettings;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Switch } from '@viamrobotics/prime-core'
|
|
3
|
+
|
|
4
|
+
import { useSettings } from '../../../hooks/useSettings.svelte'
|
|
5
|
+
|
|
6
|
+
const settings = useSettings()
|
|
7
|
+
</script>
|
|
8
|
+
|
|
9
|
+
<div class="flex w-full flex-col gap-2.5 text-xs">
|
|
10
|
+
<label class="flex items-center justify-between gap-2">
|
|
11
|
+
Render stats <Switch bind:on={settings.current.renderStats} />
|
|
12
|
+
</label>
|
|
13
|
+
</div>
|
|
@@ -11,8 +11,8 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
|
|
|
11
11
|
};
|
|
12
12
|
z_$$bindings?: Bindings;
|
|
13
13
|
}
|
|
14
|
-
declare const
|
|
14
|
+
declare const DebugSettings: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
15
|
[evt: string]: CustomEvent<any>;
|
|
16
16
|
}, {}, {}, string>;
|
|
17
|
-
type
|
|
18
|
-
export default
|
|
17
|
+
type DebugSettings = InstanceType<typeof DebugSettings>;
|
|
18
|
+
export default DebugSettings;
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Input, Switch } from '@viamrobotics/prime-core'
|
|
3
|
+
import { useResourceNames } from '@viamrobotics/svelte-sdk'
|
|
4
|
+
import { Color } from 'three'
|
|
5
|
+
|
|
6
|
+
import { usePartID } from '../../../hooks/usePartID.svelte'
|
|
7
|
+
import { useSettings } from '../../../hooks/useSettings.svelte'
|
|
8
|
+
|
|
9
|
+
const partID = usePartID()
|
|
10
|
+
const cameras = useResourceNames(() => partID.current, 'camera')
|
|
11
|
+
const settings = useSettings()
|
|
12
|
+
|
|
13
|
+
const { disabledCameras } = $derived(settings.current)
|
|
14
|
+
|
|
15
|
+
const colorHex = $derived(`#${new Color(settings.current.pointColor).getHexString()}`)
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<div class="flex flex-col gap-1 text-xs">
|
|
19
|
+
<label class="flex items-center justify-between gap-2">
|
|
20
|
+
Default point size
|
|
21
|
+
|
|
22
|
+
<div class="w-20">
|
|
23
|
+
<Input
|
|
24
|
+
bind:value={settings.current.pointSize}
|
|
25
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
26
|
+
/>
|
|
27
|
+
</div>
|
|
28
|
+
</label>
|
|
29
|
+
|
|
30
|
+
<label class="flex items-center justify-between gap-2">
|
|
31
|
+
Default point color
|
|
32
|
+
|
|
33
|
+
<div class="w-20">
|
|
34
|
+
<Input
|
|
35
|
+
type="color"
|
|
36
|
+
value={colorHex}
|
|
37
|
+
on:change={(event) => {
|
|
38
|
+
const value = (event.target as HTMLInputElement).value
|
|
39
|
+
settings.current.pointColor = value
|
|
40
|
+
}}
|
|
41
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
42
|
+
/>
|
|
43
|
+
</div>
|
|
44
|
+
</label>
|
|
45
|
+
|
|
46
|
+
<h3 class="border-gray-3 border-b py-1 text-sm"><strong>Enabled cameras</strong></h3>
|
|
47
|
+
|
|
48
|
+
{#each cameras.current as camera (camera)}
|
|
49
|
+
<div class="flex items-center justify-between py-0.5 text-xs">
|
|
50
|
+
{camera.name}
|
|
51
|
+
<Switch
|
|
52
|
+
on={disabledCameras[camera.name] !== true}
|
|
53
|
+
on:change={(event) => {
|
|
54
|
+
disabledCameras[camera.name] = !event.detail
|
|
55
|
+
}}
|
|
56
|
+
/>
|
|
57
|
+
</div>
|
|
58
|
+
{:else}
|
|
59
|
+
No cameras detected
|
|
60
|
+
{/each}
|
|
61
|
+
</div>
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { Input, Switch } from '@viamrobotics/prime-core'
|
|
3
|
+
|
|
4
|
+
import { useSettings } from '../../../hooks/useSettings.svelte'
|
|
5
|
+
|
|
6
|
+
import ToggleGroup from '../ToggleGroup.svelte'
|
|
7
|
+
|
|
8
|
+
const settings = useSettings()
|
|
9
|
+
</script>
|
|
10
|
+
|
|
11
|
+
<div class="text-gray-9 flex flex-col gap-1 text-xs">
|
|
12
|
+
<label class="flex items-center justify-between gap-2 py-1">
|
|
13
|
+
Arm Models
|
|
14
|
+
|
|
15
|
+
<ToggleGroup
|
|
16
|
+
multiple
|
|
17
|
+
options={[
|
|
18
|
+
{
|
|
19
|
+
label: 'Colliders',
|
|
20
|
+
value: 'colliders',
|
|
21
|
+
selected: settings.current.renderArmModels.includes('colliders'),
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
label: 'Model',
|
|
25
|
+
value: 'model',
|
|
26
|
+
selected: settings.current.renderArmModels.includes('model'),
|
|
27
|
+
},
|
|
28
|
+
]}
|
|
29
|
+
onSelect={(value) => {
|
|
30
|
+
settings.current.renderArmModels = (value.join('+') || 'colliders') as
|
|
31
|
+
| 'colliders'
|
|
32
|
+
| 'model'
|
|
33
|
+
| 'colliders+model'
|
|
34
|
+
|
|
35
|
+
console.log(settings.current.renderArmModels)
|
|
36
|
+
}}
|
|
37
|
+
/>
|
|
38
|
+
</label>
|
|
39
|
+
|
|
40
|
+
<label class="flex items-center justify-between gap-2">
|
|
41
|
+
Single item hover details <Switch bind:on={settings.current.renderSubEntityHoverDetail} />
|
|
42
|
+
</label>
|
|
43
|
+
|
|
44
|
+
<label class="flex items-center justify-between gap-2">
|
|
45
|
+
Object labels <Switch bind:on={settings.current.enableLabels} />
|
|
46
|
+
</label>
|
|
47
|
+
|
|
48
|
+
<h3 class="border-gray-3 border-b py-1 text-sm"><strong>Grid</strong></h3>
|
|
49
|
+
|
|
50
|
+
<label class="flex items-center justify-between gap-2 py-1">
|
|
51
|
+
Visible <Switch bind:on={settings.current.grid} />
|
|
52
|
+
</label>
|
|
53
|
+
|
|
54
|
+
<label class="flex items-center justify-between gap-2">
|
|
55
|
+
Cell size (m)
|
|
56
|
+
|
|
57
|
+
<div class="w-20">
|
|
58
|
+
<Input
|
|
59
|
+
bind:value={settings.current.gridCellSize}
|
|
60
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
61
|
+
/>
|
|
62
|
+
</div>
|
|
63
|
+
</label>
|
|
64
|
+
|
|
65
|
+
<label class="flex items-center justify-between gap-2">
|
|
66
|
+
Section size (m)
|
|
67
|
+
|
|
68
|
+
<div class="w-20">
|
|
69
|
+
<Input
|
|
70
|
+
bind:value={settings.current.gridSectionSize}
|
|
71
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
72
|
+
/>
|
|
73
|
+
</div>
|
|
74
|
+
</label>
|
|
75
|
+
|
|
76
|
+
<label class="flex items-center justify-between gap-2">
|
|
77
|
+
Fade distance (m)
|
|
78
|
+
|
|
79
|
+
<div class="w-20">
|
|
80
|
+
<Input
|
|
81
|
+
bind:value={settings.current.gridFadeDistance}
|
|
82
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
83
|
+
/>
|
|
84
|
+
</div>
|
|
85
|
+
</label>
|
|
86
|
+
|
|
87
|
+
<h3 class="border-gray-3 border-b py-1 text-sm"><strong>Lines</strong></h3>
|
|
88
|
+
|
|
89
|
+
<label class="flex items-center justify-between gap-2">
|
|
90
|
+
Thickness
|
|
91
|
+
|
|
92
|
+
<div class="w-20">
|
|
93
|
+
<Input
|
|
94
|
+
bind:value={settings.current.lineWidth}
|
|
95
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
96
|
+
/>
|
|
97
|
+
</div>
|
|
98
|
+
</label>
|
|
99
|
+
|
|
100
|
+
<label class="flex items-center justify-between gap-2">
|
|
101
|
+
Dot size
|
|
102
|
+
|
|
103
|
+
<div class="w-20">
|
|
104
|
+
<Input
|
|
105
|
+
bind:value={settings.current.lineDotSize}
|
|
106
|
+
on:keydown={(event) => event.stopImmediatePropagation()}
|
|
107
|
+
/>
|
|
108
|
+
</div>
|
|
109
|
+
</label>
|
|
110
|
+
</div>
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> = any, Events extends Record<string, any> = any, Slots extends Record<string, any> = any, Exports = {}, Bindings = string> {
|
|
2
|
+
new (options: import('svelte').ComponentConstructorOptions<Props>): import('svelte').SvelteComponent<Props, Events, Slots> & {
|
|
3
|
+
$$bindings?: Bindings;
|
|
4
|
+
} & Exports;
|
|
5
|
+
(internal: unknown, props: {
|
|
6
|
+
$$events?: Events;
|
|
7
|
+
$$slots?: Slots;
|
|
8
|
+
}): Exports & {
|
|
9
|
+
$set?: any;
|
|
10
|
+
$on?: any;
|
|
11
|
+
};
|
|
12
|
+
z_$$bindings?: Bindings;
|
|
13
|
+
}
|
|
14
|
+
declare const SceneSettings: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
|
|
15
|
+
[evt: string]: CustomEvent<any>;
|
|
16
|
+
}, {}, {}, string>;
|
|
17
|
+
type SceneSettings = InstanceType<typeof SceneSettings>;
|
|
18
|
+
export default SceneSettings;
|