@viamrobotics/motion-tools 0.3.1 → 0.3.3
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.
|
@@ -22,6 +22,8 @@
|
|
|
22
22
|
createPartIDContext(() => partID)
|
|
23
23
|
|
|
24
24
|
const enableXR = new PersistedState('enable-xr', false)
|
|
25
|
+
|
|
26
|
+
let root: HTMLElement
|
|
25
27
|
</script>
|
|
26
28
|
|
|
27
29
|
<svelte:window
|
|
@@ -32,7 +34,10 @@
|
|
|
32
34
|
}}
|
|
33
35
|
/>
|
|
34
36
|
|
|
35
|
-
<div
|
|
37
|
+
<div
|
|
38
|
+
class="relative h-full w-full"
|
|
39
|
+
bind:this={root}
|
|
40
|
+
>
|
|
36
41
|
<Canvas renderMode="always">
|
|
37
42
|
<World>
|
|
38
43
|
<SceneProviders>
|
|
@@ -45,12 +50,12 @@
|
|
|
45
50
|
{/if}
|
|
46
51
|
</Scene>
|
|
47
52
|
|
|
48
|
-
<DomPortal>
|
|
53
|
+
<DomPortal element={root}>
|
|
49
54
|
<Details />
|
|
50
55
|
</DomPortal>
|
|
51
56
|
|
|
52
57
|
{#if !focus}
|
|
53
|
-
<DomPortal>
|
|
58
|
+
<DomPortal element={root}>
|
|
54
59
|
<TreeContainer />
|
|
55
60
|
</DomPortal>
|
|
56
61
|
{/if}
|
|
@@ -1,10 +1,18 @@
|
|
|
1
1
|
<script lang="ts">
|
|
2
|
-
|
|
2
|
+
import type { Snippet } from 'svelte'
|
|
3
|
+
|
|
4
|
+
interface Props {
|
|
5
|
+
element?: HTMLElement
|
|
6
|
+
children: Snippet
|
|
7
|
+
}
|
|
8
|
+
|
|
9
|
+
let { children, element }: Props = $props()
|
|
3
10
|
|
|
4
11
|
let div: HTMLDivElement
|
|
5
12
|
|
|
6
13
|
$effect(() => {
|
|
7
|
-
document.body
|
|
14
|
+
const parent = element ?? document.body
|
|
15
|
+
parent.append(div)
|
|
8
16
|
return () => {
|
|
9
17
|
// eslint-disable-next-line svelte/no-dom-manipulating
|
|
10
18
|
div.remove()
|
|
@@ -1,5 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
1
|
+
import type { Snippet } from 'svelte';
|
|
2
|
+
interface Props {
|
|
3
|
+
element?: HTMLElement;
|
|
4
|
+
children: Snippet;
|
|
5
|
+
}
|
|
6
|
+
declare const DomPortal: import("svelte").Component<Props, {}, "">;
|
|
4
7
|
type DomPortal = ReturnType<typeof DomPortal>;
|
|
5
8
|
export default DomPortal;
|
|
@@ -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,
|