@viamrobotics/motion-tools 0.9.0 → 0.9.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.
@@ -24,7 +24,7 @@
24
24
  </script>
25
25
 
26
26
  <div
27
- class="relative h-full w-full"
27
+ class="relative h-full w-full overflow-hidden"
28
28
  bind:this={root}
29
29
  >
30
30
  <Canvas renderMode="always">
@@ -25,6 +25,7 @@
25
25
  makeDefault
26
26
  near={-100}
27
27
  far={100}
28
+ zoom={200}
28
29
  up={[0, 0, 1]}
29
30
  oncreate={(ref) => {
30
31
  ref.lookAt(0, 0, 0)
@@ -75,7 +75,7 @@
75
75
  {#if object}
76
76
  {@const { geometry } = object}
77
77
  <div
78
- class="border-medium bg-extralight absolute top-0 right-0 z-10 m-2 w-60 border p-2 text-xs"
78
+ class="border-medium bg-extralight absolute top-0 right-0 z-1000 m-2 w-60 border p-2 text-xs"
79
79
  style:transform="translate({draggable.current.x}px, {draggable.current.y}px)"
80
80
  {...rest}
81
81
  >
@@ -0,0 +1,25 @@
1
+ <script lang="ts">
2
+ import { HTML } from '@threlte/extras'
3
+
4
+ import { useSettings } from '../hooks/useSettings.svelte'
5
+
6
+ interface Props {
7
+ text: string
8
+ }
9
+
10
+ let { text }: Props = $props()
11
+
12
+ const settings = useSettings()
13
+
14
+ const labels = $derived(settings.current.enableLabels)
15
+ </script>
16
+
17
+ {#if labels}
18
+ <HTML
19
+ center
20
+ zIndexRange={[100, 0]}
21
+ class="border-gray-7 border bg-white px-2 py-1 text-xs"
22
+ >
23
+ {text}
24
+ </HTML>
25
+ {/if}
@@ -0,0 +1,6 @@
1
+ interface Props {
2
+ text: string;
3
+ }
4
+ declare const Label: import("svelte").Component<Props, {}, "">;
5
+ type Label = ReturnType<typeof Label>;
6
+ export default Label;
File without changes
@@ -1,5 +1,18 @@
1
+ export default Labels;
2
+ type Labels = SvelteComponent<{
3
+ [x: string]: never;
4
+ }, {
5
+ [evt: string]: CustomEvent<any>;
6
+ }, {}> & {
7
+ $$bindings?: string | undefined;
8
+ };
9
+ declare const Labels: $$__sveltets_2_IsomorphicComponent<{
10
+ [x: string]: never;
11
+ }, {
12
+ [evt: string]: CustomEvent<any>;
13
+ }, {}, {}, string>;
1
14
  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> & {
15
+ new (options: import("svelte").ComponentConstructorOptions<Props>): import("svelte").SvelteComponent<Props, Events, Slots> & {
3
16
  $$bindings?: Bindings;
4
17
  } & Exports;
5
18
  (internal: unknown, props: {
@@ -11,8 +24,3 @@ interface $$__sveltets_2_IsomorphicComponent<Props extends Record<string, any> =
11
24
  };
12
25
  z_$$bindings?: Bindings;
13
26
  }
14
- declare const Frames: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type Frames = InstanceType<typeof Frames>;
18
- export default Frames;
@@ -4,12 +4,14 @@
4
4
  import Frame from './Frame.svelte'
5
5
  import type { WorldObject } from '../WorldObject'
6
6
  import { useSettings } from '../hooks/useSettings.svelte'
7
+ import type { Snippet } from 'svelte'
7
8
 
8
9
  interface Props {
9
10
  object: WorldObject
11
+ children?: Snippet
10
12
  }
11
13
 
12
- let { object }: Props = $props()
14
+ let { object, children }: Props = $props()
13
15
 
14
16
  const settings = useSettings()
15
17
  </script>
@@ -35,5 +37,7 @@
35
37
  scale={Number(settings.current.lineDotSize)}
36
38
  />
37
39
  {/each}
40
+
41
+ {@render children?.()}
38
42
  </InstancedMesh>
39
43
  {/if}
@@ -1,6 +1,8 @@
1
1
  import type { WorldObject } from '../WorldObject';
2
+ import type { Snippet } from 'svelte';
2
3
  interface Props {
3
4
  object: WorldObject;
5
+ children?: Snippet;
4
6
  }
5
7
  declare const Line: import("svelte").Component<Props, {}, "">;
6
8
  type Line = ReturnType<typeof Line>;
@@ -13,12 +13,14 @@
13
13
  import { meshBounds } from '@threlte/extras'
14
14
  import { poseToObject3d } from '../transform'
15
15
  import { useSettings } from '../hooks/useSettings.svelte'
16
+ import type { Snippet } from 'svelte'
16
17
 
17
18
  interface Props {
18
19
  object: WorldObject<{ case: 'points'; value: Float32Array<ArrayBuffer> }>
20
+ children?: Snippet
19
21
  }
20
22
 
21
- let { object }: Props = $props()
23
+ let { object, children }: Props = $props()
22
24
 
23
25
  const { camera } = useThrelte()
24
26
  const settings = useSettings()
@@ -88,4 +90,5 @@
88
90
  >
89
91
  <T is={geometry} />
90
92
  <T is={material} />
93
+ {@render children?.()}
91
94
  </T>
@@ -1,9 +1,11 @@
1
1
  import type { WorldObject } from '../WorldObject';
2
+ import type { Snippet } from 'svelte';
2
3
  interface Props {
3
4
  object: WorldObject<{
4
5
  case: 'points';
5
6
  value: Float32Array<ArrayBuffer>;
6
7
  }>;
8
+ children?: Snippet;
7
9
  }
8
10
  declare const Pointcloud: import("svelte").Component<Props, {}, "">;
9
11
  type Pointcloud = ReturnType<typeof Pointcloud>;
@@ -3,12 +3,10 @@
3
3
  import { T } from '@threlte/core'
4
4
  import { Grid, interactivity, PerfMonitor } from '@threlte/extras'
5
5
  import { PortalTarget } from './portal'
6
- import Frames from './Frames.svelte'
7
- import Pointclouds from './Pointclouds.svelte'
6
+ import WorldObjects from './WorldObjects.svelte'
8
7
  import Selected from './Selected.svelte'
9
8
  import Focus from './Focus.svelte'
10
9
  import StaticGeometries from './StaticGeometries.svelte'
11
- import Shapes from './Shapes.svelte'
12
10
  import Camera from './Camera.svelte'
13
11
  import { useFocusedObject3d } from '../hooks/useSelection.svelte'
14
12
  import type { Snippet } from 'svelte'
@@ -66,9 +64,8 @@
66
64
 
67
65
  <MeasureTool />
68
66
  <StaticGeometries />
69
- <Frames />
70
- <Pointclouds />
71
- <Shapes />
67
+
68
+ <WorldObjects />
72
69
 
73
70
  <Selected />
74
71
 
@@ -35,7 +35,11 @@
35
35
  } else {
36
36
  const object3d = scene.getObjectByProperty('uuid', selected.current.uuid)
37
37
  if (object3d) {
38
- box.setFromObject(object3d)
38
+ // Create a clone so that our bounding box doesn't include children
39
+ const clone = object3d.clone(false)
40
+ object3d.getWorldPosition(clone.position)
41
+ object3d.getWorldQuaternion(clone.quaternion)
42
+ box.setFromObject(clone)
39
43
  }
40
44
  }
41
45
  })
@@ -84,14 +84,18 @@
84
84
  </label>
85
85
  </div>
86
86
 
87
- <h3 class="pt-2 text-sm"><strong>Grid</strong></h3>
87
+ <h3 class="pt-2 text-sm"><strong>Scene</strong></h3>
88
88
  <div class="flex flex-col gap-2.5">
89
89
  <label class="flex items-center justify-between gap-2">
90
- Enabled <Switch bind:on={settings.current.grid} />
90
+ Object labels <Switch bind:on={settings.current.enableLabels} />
91
91
  </label>
92
92
 
93
93
  <label class="flex items-center justify-between gap-2">
94
- Cell size (m)
94
+ Grid <Switch bind:on={settings.current.grid} />
95
+ </label>
96
+
97
+ <label class="flex items-center justify-between gap-2">
98
+ Grid cell size (m)
95
99
 
96
100
  <div class="w-20">
97
101
  <Input
@@ -102,7 +106,7 @@
102
106
  </label>
103
107
 
104
108
  <label class="flex items-center justify-between gap-2">
105
- Section size (m)
109
+ Grid section size (m)
106
110
 
107
111
  <div class="w-20">
108
112
  <Input
@@ -113,7 +117,7 @@
113
117
  </label>
114
118
 
115
119
  <label class="flex items-center justify-between gap-2">
116
- Fade distance (m)
120
+ Grid fade distance (m)
117
121
 
118
122
  <div class="w-20">
119
123
  <Input
@@ -35,7 +35,7 @@
35
35
  </script>
36
36
 
37
37
  <div
38
- class="bg-extralight border-medium absolute top-0 left-0 m-2 overflow-y-auto border text-xs"
38
+ class="bg-extralight border-medium absolute top-0 left-0 z-1000 m-2 overflow-y-auto border text-xs"
39
39
  style:transform="translate({draggable.current.x}px, {draggable.current.y}px)"
40
40
  {...rest}
41
41
  >
@@ -0,0 +1,131 @@
1
+ <script lang="ts">
2
+ import { T } from '@threlte/core'
3
+ import { Portal, PortalTarget } from './portal'
4
+ import { useFrames } from '../hooks/useFrames.svelte'
5
+ import { useGeometries } from '../hooks/useGeometries.svelte'
6
+ import { usePointClouds } from '../hooks/usePointclouds.svelte'
7
+ import { useDrawAPI } from '../hooks/useDrawAPI.svelte'
8
+ import Pose from './Pose.svelte'
9
+ import Frame from './Frame.svelte'
10
+ import Line from './Line.svelte'
11
+ import Pointcloud from './Pointcloud.svelte'
12
+ import Model from './WorldObject.svelte'
13
+ import Label from './Label.svelte'
14
+
15
+ const points = usePointClouds()
16
+ const drawAPI = useDrawAPI()
17
+ const frames = useFrames()
18
+ const geometries = useGeometries()
19
+ </script>
20
+
21
+ {#each frames.current as object (object.uuid)}
22
+ <Pose name={object.name}>
23
+ {#snippet children({ pose })}
24
+ {#if pose}
25
+ <Frame
26
+ uuid={object.uuid}
27
+ name={object.name}
28
+ {pose}
29
+ geometry={object.geometry}
30
+ metadata={object.metadata}
31
+ >
32
+ <PortalTarget id={object.name} />
33
+ <Label text={object.name} />
34
+ </Frame>
35
+ {:else}
36
+ <Portal id={object.referenceFrame}>
37
+ <Frame
38
+ uuid={object.uuid}
39
+ name={object.name}
40
+ pose={pose ?? object.pose}
41
+ geometry={object.geometry}
42
+ metadata={object.metadata}
43
+ >
44
+ <PortalTarget id={object.name} />
45
+ <Label text={object.name} />
46
+ </Frame>
47
+ </Portal>
48
+ {/if}
49
+ {/snippet}
50
+ </Pose>
51
+ {/each}
52
+
53
+ {#each geometries.current as object (object.uuid)}
54
+ <Portal id={object.referenceFrame}>
55
+ <Frame
56
+ uuid={object.uuid}
57
+ name={object.name}
58
+ pose={object.pose}
59
+ geometry={object.geometry}
60
+ metadata={object.metadata}
61
+ >
62
+ <PortalTarget id={object.name} />
63
+ <Label text={object.name} />
64
+ </Frame>
65
+ </Portal>
66
+ {/each}
67
+
68
+ {#each points.current as object (object.uuid)}
69
+ <Portal id={object.referenceFrame}>
70
+ <Pointcloud {object}>
71
+ <Label text={object.name} />
72
+ </Pointcloud>
73
+ </Portal>
74
+ {/each}
75
+
76
+ {#each drawAPI.points as object (object.uuid)}
77
+ <Portal id={object.referenceFrame}>
78
+ <Pointcloud {object}>
79
+ <Label text={object.name} />
80
+ </Pointcloud>
81
+ </Portal>
82
+ {/each}
83
+
84
+ <T
85
+ name={drawAPI.object3ds.batchedArrow.object3d.name}
86
+ is={drawAPI.object3ds.batchedArrow.object3d}
87
+ dispose={false}
88
+ />
89
+
90
+ {#each drawAPI.meshes as object (object.uuid)}
91
+ <Portal id={object.referenceFrame}>
92
+ <Frame
93
+ uuid={object.uuid}
94
+ name={object.name}
95
+ pose={object.pose}
96
+ geometry={object.geometry}
97
+ metadata={object.metadata}
98
+ >
99
+ <PortalTarget id={object.name} />
100
+ <Label text={object.name} />
101
+ </Frame>
102
+ </Portal>
103
+ {/each}
104
+
105
+ {#each drawAPI.nurbs as object (object.uuid)}
106
+ <Portal id={object.referenceFrame}>
107
+ <Frame
108
+ uuid={object.uuid}
109
+ name={object.name}
110
+ pose={object.pose}
111
+ geometry={object.geometry}
112
+ metadata={object.metadata}
113
+ >
114
+ <PortalTarget id={object.name} />
115
+ <Label text={object.name} />
116
+ </Frame>
117
+ </Portal>
118
+ {/each}
119
+
120
+ {#each drawAPI.models as object (object.uuid)}
121
+ <Model {object}>
122
+ <PortalTarget id={object.name} />
123
+ <Label text={object.name} />
124
+ </Model>
125
+ {/each}
126
+
127
+ {#each drawAPI.lines as object (object.uuid)}
128
+ <Line {object}>
129
+ <Label text={object.name} />
130
+ </Line>
131
+ {/each}
@@ -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 Shapes: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
14
+ declare const WorldObjects: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
15
  [evt: string]: CustomEvent<any>;
16
16
  }, {}, {}, string>;
17
- type Shapes = InstanceType<typeof Shapes>;
18
- export default Shapes;
17
+ type WorldObjects = InstanceType<typeof WorldObjects>;
18
+ export default WorldObjects;
@@ -9,7 +9,7 @@
9
9
  </script>
10
10
 
11
11
  <div
12
- class="absolute top-2 flex w-full justify-center gap-2"
12
+ class="absolute top-2 z-1000 flex w-full justify-center gap-2"
13
13
  {...rest}
14
14
  >
15
15
  <!-- camera view -->
@@ -13,6 +13,7 @@ interface Settings {
13
13
  lineDotSize: number;
14
14
  enableXR: boolean;
15
15
  enableMeasure: boolean;
16
+ enableLabels: boolean;
16
17
  renderStats: boolean;
17
18
  }
18
19
  interface Context {
@@ -15,6 +15,7 @@ const defaults = () => ({
15
15
  lineWidth: 0.005,
16
16
  lineDotSize: 0.01,
17
17
  enableMeasure: false,
18
+ enableLabels: false,
18
19
  enableXR: false,
19
20
  renderStats: false,
20
21
  });
package/package.json CHANGED
@@ -1,71 +1,71 @@
1
1
  {
2
2
  "name": "@viamrobotics/motion-tools",
3
- "version": "0.9.0",
3
+ "version": "0.9.1",
4
4
  "description": "Motion visualization with Viam",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",
7
7
  "devDependencies": {
8
- "@ag-grid-community/client-side-row-model": "32.3.5",
9
- "@ag-grid-community/core": "32.3.5",
10
- "@ag-grid-community/styles": "32.3.5",
8
+ "@ag-grid-community/client-side-row-model": "32.3.8",
9
+ "@ag-grid-community/core": "32.3.8",
10
+ "@ag-grid-community/styles": "32.3.8",
11
11
  "@changesets/cli": "2.29.5",
12
- "@dimforge/rapier3d-compat": "0.17.3",
12
+ "@dimforge/rapier3d-compat": "0.18.0",
13
13
  "@eslint/compat": "1.3.1",
14
- "@eslint/js": "9.31.0",
15
- "@playwright/test": "1.54.1",
16
- "@sentry/sveltekit": "9.40.0",
14
+ "@eslint/js": "9.32.0",
15
+ "@playwright/test": "1.54.2",
16
+ "@sentry/sveltekit": "10.1.0",
17
17
  "@skeletonlabs/skeleton": "3.1.7",
18
18
  "@skeletonlabs/skeleton-svelte": "1.3.1",
19
19
  "@sveltejs/adapter-static": "3.0.8",
20
- "@sveltejs/kit": "2.25.1",
20
+ "@sveltejs/kit": "2.27.1",
21
21
  "@sveltejs/package": "2.4.0",
22
22
  "@sveltejs/vite-plugin-svelte": "6.1.0",
23
23
  "@tailwindcss/forms": "0.5.10",
24
24
  "@tailwindcss/vite": "4.1.11",
25
- "@tanstack/svelte-query": "5.83.0",
26
- "@tanstack/svelte-query-devtools": "5.83.0",
27
- "@testing-library/jest-dom": "6.6.3",
25
+ "@tanstack/svelte-query": "5.83.1",
26
+ "@tanstack/svelte-query-devtools": "5.84.0",
27
+ "@testing-library/jest-dom": "6.6.4",
28
28
  "@testing-library/svelte": "5.2.8",
29
- "@threlte/core": "8.1.3",
30
- "@threlte/extras": "9.4.2",
31
- "@threlte/rapier": "3.1.4",
29
+ "@threlte/core": "8.1.4",
30
+ "@threlte/extras": "9.4.4",
31
+ "@threlte/rapier": "3.1.5",
32
32
  "@threlte/xr": "1.0.8",
33
33
  "@types/bun": "1.2.19",
34
34
  "@types/lodash-es": "4.17.12",
35
- "@types/three": "0.178.1",
36
- "@typescript-eslint/eslint-plugin": "8.38.0",
37
- "@typescript-eslint/parser": "8.38.0",
35
+ "@types/three": "0.179.0",
36
+ "@typescript-eslint/eslint-plugin": "8.39.0",
37
+ "@typescript-eslint/parser": "8.39.0",
38
38
  "@viamrobotics/prime-core": "0.1.5",
39
39
  "@viamrobotics/sdk": "0.46.0",
40
- "@viamrobotics/svelte-sdk": "0.4.3",
40
+ "@viamrobotics/svelte-sdk": "0.4.5",
41
41
  "@vitejs/plugin-basic-ssl": "2.1.0",
42
- "@zag-js/svelte": "1.19.0",
43
- "@zag-js/tree-view": "1.19.0",
42
+ "@zag-js/svelte": "1.21.1",
43
+ "@zag-js/tree-view": "1.21.1",
44
44
  "camera-controls": "3.1.0",
45
- "eslint": "9.31.0",
45
+ "eslint": "9.32.0",
46
46
  "eslint-config-prettier": "10.1.8",
47
- "eslint-plugin-svelte": "3.10.1",
47
+ "eslint-plugin-svelte": "3.11.0",
48
48
  "globals": "16.3.0",
49
49
  "idb-keyval": "6.2.2",
50
50
  "jsdom": "26.1.0",
51
51
  "lodash-es": "4.17.21",
52
- "lucide-svelte": "0.525.0",
52
+ "lucide-svelte": "0.536.0",
53
53
  "prettier": "3.6.2",
54
54
  "prettier-plugin-svelte": "3.4.0",
55
55
  "prettier-plugin-tailwindcss": "0.6.14",
56
56
  "publint": "0.3.12",
57
- "runed": "0.31.0",
58
- "svelte": "5.36.13",
59
- "svelte-check": "4.3.0",
57
+ "runed": "0.31.1",
58
+ "svelte": "5.37.3",
59
+ "svelte-check": "4.3.1",
60
60
  "svelte-virtuallists": "1.4.2",
61
61
  "tailwindcss": "4.1.11",
62
- "three": "0.178.0",
62
+ "three": "0.179.1",
63
63
  "threlte-uikit": "1.2.0",
64
64
  "tsx": "4.20.3",
65
- "typescript": "5.8.3",
66
- "typescript-eslint": "8.38.0",
65
+ "typescript": "5.9.2",
66
+ "typescript-eslint": "8.39.0",
67
67
  "vite": "6.3.5",
68
- "vite-plugin-devtools-json": "0.3.0",
68
+ "vite-plugin-devtools-json": "0.4.1",
69
69
  "vite-plugin-mkcert": "1.17.8",
70
70
  "vitest": "3.2.4"
71
71
  },
@@ -1,54 +0,0 @@
1
- <script lang="ts">
2
- import { Portal, PortalTarget } from './portal'
3
- import Frame from './Frame.svelte'
4
- import { useFrames } from '../hooks/useFrames.svelte'
5
- import { useGeometries } from '../hooks/useGeometries.svelte'
6
- import Pose from './Pose.svelte'
7
-
8
- const frames = useFrames()
9
- const geometries = useGeometries()
10
- </script>
11
-
12
- {#each frames.current as object (object.uuid)}
13
- <Pose name={object.name}>
14
- {#snippet children({ pose })}
15
- {#if pose}
16
- <Frame
17
- uuid={object.uuid}
18
- name={object.name}
19
- {pose}
20
- geometry={object.geometry}
21
- metadata={object.metadata}
22
- >
23
- <PortalTarget id={object.name} />
24
- </Frame>
25
- {:else}
26
- <Portal id={object.referenceFrame}>
27
- <Frame
28
- uuid={object.uuid}
29
- name={object.name}
30
- pose={pose ?? object.pose}
31
- geometry={object.geometry}
32
- metadata={object.metadata}
33
- >
34
- <PortalTarget id={object.name} />
35
- </Frame>
36
- </Portal>
37
- {/if}
38
- {/snippet}
39
- </Pose>
40
- {/each}
41
-
42
- {#each geometries.current as object (object.uuid)}
43
- <Portal id={object.referenceFrame}>
44
- <Frame
45
- uuid={object.uuid}
46
- name={object.name}
47
- pose={object.pose}
48
- geometry={object.geometry}
49
- metadata={object.metadata}
50
- >
51
- <PortalTarget id={object.name} />
52
- </Frame>
53
- </Portal>
54
- {/each}
@@ -1,21 +0,0 @@
1
- <script lang="ts">
2
- import { Portal } from './portal'
3
- import { usePointClouds } from '../hooks/usePointclouds.svelte'
4
- import { useDrawAPI } from '../hooks/useDrawAPI.svelte'
5
- import Pointcloud from './Pointcloud.svelte'
6
-
7
- const points = usePointClouds()
8
- const drawAPI = useDrawAPI()
9
- </script>
10
-
11
- {#each points.current as object (object.uuid)}
12
- <Portal id={object.referenceFrame}>
13
- <Pointcloud {object} />
14
- </Portal>
15
- {/each}
16
-
17
- {#each drawAPI.points as object (object.uuid)}
18
- <Portal id={object.referenceFrame}>
19
- <Pointcloud {object} />
20
- </Portal>
21
- {/each}
@@ -1,18 +0,0 @@
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 Pointclouds: $$__sveltets_2_IsomorphicComponent<Record<string, never>, {
15
- [evt: string]: CustomEvent<any>;
16
- }, {}, {}, string>;
17
- type Pointclouds = InstanceType<typeof Pointclouds>;
18
- export default Pointclouds;
@@ -1,54 +0,0 @@
1
- <script lang="ts">
2
- import { T } from '@threlte/core'
3
- import { Portal, PortalTarget } from './portal'
4
- import { useDrawAPI } from '../hooks/useDrawAPI.svelte'
5
- import WorldObject from './WorldObject.svelte'
6
- import Frame from './Frame.svelte'
7
- import Line from './Line.svelte'
8
-
9
- const drawAPI = useDrawAPI()
10
- </script>
11
-
12
- <T
13
- name={drawAPI.object3ds.batchedArrow.object3d.name}
14
- is={drawAPI.object3ds.batchedArrow.object3d}
15
- dispose={false}
16
- />
17
-
18
- {#each drawAPI.meshes as object (object.uuid)}
19
- <Portal id={object.referenceFrame}>
20
- <Frame
21
- uuid={object.uuid}
22
- name={object.name}
23
- pose={object.pose}
24
- geometry={object.geometry}
25
- metadata={object.metadata}
26
- >
27
- <PortalTarget id={object.name} />
28
- </Frame>
29
- </Portal>
30
- {/each}
31
-
32
- {#each drawAPI.nurbs as object (object.uuid)}
33
- <Portal id={object.referenceFrame}>
34
- <Frame
35
- uuid={object.uuid}
36
- name={object.name}
37
- pose={object.pose}
38
- geometry={object.geometry}
39
- metadata={object.metadata}
40
- >
41
- <PortalTarget id={object.name} />
42
- </Frame>
43
- </Portal>
44
- {/each}
45
-
46
- {#each drawAPI.models as object (object.uuid)}
47
- <WorldObject {object}>
48
- <PortalTarget id={object.name} />
49
- </WorldObject>
50
- {/each}
51
-
52
- {#each drawAPI.lines as object (object.uuid)}
53
- <Line {object} />
54
- {/each}