@viamrobotics/motion-tools 0.11.4 → 0.11.5

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.
@@ -4,9 +4,10 @@ import { fromTransform } from '../WorldObject.svelte';
4
4
  import { usePartID } from './usePartID.svelte';
5
5
  import { setInUnsafe } from '@thi.ng/paths';
6
6
  import { getContext, setContext } from 'svelte';
7
- import WorldStateWorker from '../workers/worldStateWorker?worker';
8
7
  const key = Symbol('world-state-context');
9
- const worker = new WorldStateWorker();
8
+ const worker = new Worker(new URL('../workers/worldStateWorker.ts', import.meta.url), {
9
+ type: 'module',
10
+ });
10
11
  export const provideWorldStates = () => {
11
12
  const partID = usePartID();
12
13
  const resourceNames = useResourceNames(() => partID.current, 'world_state_store');
@@ -1,5 +1,4 @@
1
- import PCDWorker from './worker?worker';
2
- const worker = new PCDWorker();
1
+ const worker = new Worker(new URL('./worker', import.meta.url), { type: 'module' });
3
2
  let requestId = 0;
4
3
  const pending = new Map();
5
4
  worker.addEventListener('message', (event) => {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@viamrobotics/motion-tools",
3
- "version": "0.11.4",
3
+ "version": "0.11.5",
4
4
  "description": "Motion visualization with Viam",
5
5
  "license": "Apache-2.0",
6
6
  "type": "module",