@viamrobotics/motion-tools 0.3.0 → 0.3.2
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 +26 -21
- package/dist/components/Details.svelte +1 -1
- package/dist/components/DomPortal.svelte +9 -2
- package/dist/components/DomPortal.svelte.d.ts +6 -3
- package/dist/components/Tree/TreeContainer.svelte +2 -2
- package/dist/hooks/usePointclouds.svelte.js +0 -1
- package/package.json +1 -1
|
@@ -32,31 +32,36 @@
|
|
|
32
32
|
}}
|
|
33
33
|
/>
|
|
34
34
|
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
</Scene>
|
|
35
|
+
<div
|
|
36
|
+
class="relative h-full w-full"
|
|
37
|
+
id="motion-tools-root"
|
|
38
|
+
>
|
|
39
|
+
<Canvas renderMode="always">
|
|
40
|
+
<World>
|
|
41
|
+
<SceneProviders>
|
|
42
|
+
{#snippet children({ focus })}
|
|
43
|
+
<Scene>
|
|
44
|
+
{@render appChildren?.()}
|
|
46
45
|
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
46
|
+
{#if enableXR.current}
|
|
47
|
+
<XR />
|
|
48
|
+
{/if}
|
|
49
|
+
</Scene>
|
|
50
50
|
|
|
51
|
-
{#if !focus}
|
|
52
51
|
<DomPortal>
|
|
53
|
-
<
|
|
52
|
+
<Details />
|
|
54
53
|
</DomPortal>
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
</
|
|
54
|
+
|
|
55
|
+
{#if !focus}
|
|
56
|
+
<DomPortal>
|
|
57
|
+
<TreeContainer />
|
|
58
|
+
</DomPortal>
|
|
59
|
+
{/if}
|
|
60
|
+
{/snippet}
|
|
61
|
+
</SceneProviders>
|
|
62
|
+
</World>
|
|
63
|
+
</Canvas>
|
|
64
|
+
</div>
|
|
60
65
|
|
|
61
66
|
{#if enableXR.current}
|
|
62
67
|
<XRButton mode="immersive-ar" />
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
|
|
14
14
|
{#if object}
|
|
15
15
|
{@const { geometry, pose } = object}
|
|
16
|
-
<div class="border-medium bg-extralight
|
|
16
|
+
<div class="border-medium bg-extralight absolute top-0 right-0 z-10 m-2 w-60 border p-2 text-xs">
|
|
17
17
|
<div class="flex items-center justify-between gap-2 pb-2">
|
|
18
18
|
<div class="flex items-center gap-1">
|
|
19
19
|
<button>
|
|
@@ -1,10 +1,17 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
selector?: string
|
|
6
|
+
children: Snippet
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { children, selector = 'body' }: Props = $props()
|
|
3
10
|
|
|
4
11
|
let div: HTMLDivElement
|
|
5
12
|
|
|
6
13
|
$effect(() => {
|
|
7
|
-
document.
|
|
14
|
+
document.querySelector(selector)?.append(div)
|
|
8
15
|
return () => {
|
|
9
16
|
// eslint-disable-next-line svelte/no-dom-manipulating
|
|
10
17
|
div.remove()
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
selector?: string;
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const DomPortal: import("svelte").Component<Props, {}, "">;
|
|
4
7
|
type DomPortal = ReturnType<typeof DomPortal>;
|
|
5
8
|
export default DomPortal;
|
|
@@ -44,7 +44,7 @@
|
|
|
44
44
|
/>
|
|
45
45
|
|
|
46
46
|
<button
|
|
47
|
-
class="
|
|
47
|
+
class="absolute top-2 left-2 p-2"
|
|
48
48
|
onclick={() => (showTreeview.current = !showTreeview.current)}
|
|
49
49
|
>
|
|
50
50
|
<ListTree />
|
|
@@ -52,7 +52,7 @@
|
|
|
52
52
|
|
|
53
53
|
{#if showTreeview.current}
|
|
54
54
|
<div
|
|
55
|
-
class="bg-extralight border-medium
|
|
55
|
+
class="bg-extralight border-medium absolute top-0 left-0 m-2 overflow-y-auto border text-xs"
|
|
56
56
|
in:fly={{ duration: 250, x: -100 }}
|
|
57
57
|
out:fly={{ duration: 250, x: -100 }}
|
|
58
58
|
>
|
|
@@ -20,7 +20,6 @@ export const providePointclouds = (partID) => {
|
|
|
20
20
|
const options = $derived(clients.map((cameraClient) => {
|
|
21
21
|
const name = cameraClient.current?.name ?? '';
|
|
22
22
|
const interval = refreshRates.get('Pointclouds');
|
|
23
|
-
console.log(interval);
|
|
24
23
|
return queryOptions({
|
|
25
24
|
enabled: interval !== -1 && cameraClient.current !== undefined,
|
|
26
25
|
refetchInterval: interval === 0 ? false : interval,
|