@luxonis/visualizer-protobuf 2.31.1 → 2.32.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.
Files changed (56) hide show
  1. package/dist/{FoxgloveServer-BssAO1ix.js → FoxgloveServer-C39Uooyk.js} +4 -15
  2. package/dist/{communicator-D49kmBTQ.js → communicator-1cvNRjMr.js} +1 -1
  3. package/dist/{deserialization.worker-DsCOJqEa.js → deserialization.worker-d0xuPKYs.js} +1 -1
  4. package/dist/{foxglove-protocol-BQ1FsNfG.js → foxglove-protocol-CYoMweAY.js} +1 -1
  5. package/dist/{index-CDS7NmJ7.js → index-B9ZvmN6i.js} +3 -3
  6. package/dist/{index-Bgt0P9DZ.js → index-BDyXMzQ6.js} +3 -3
  7. package/dist/{index-uoDpeMpU.js → index-BL_I8-0V.js} +3 -3
  8. package/dist/{index-BP8xet9G.js → index-BN96rKt2.js} +89 -50
  9. package/dist/{index-DKy3gbmW.js → index-BiuCJhwT.js} +3 -3
  10. package/dist/{index-BgHqUgA4.js → index-BpJwPs_P.js} +4 -4
  11. package/dist/{index-Bgmmj1v0.js → index-BxwFQSQF.js} +64 -44
  12. package/dist/{index-B_E0WpuE.js → index-C6r0_Z5X.js} +3 -3
  13. package/dist/{index-D77uCBAO.js → index-CW4po4LY.js} +3 -3
  14. package/dist/{index-BRoKkcrX.js → index-C_92hNxE.js} +3 -3
  15. package/dist/{index-WSsHQmbV.js → index-CyuWa_3o.js} +3 -3
  16. package/dist/{index-BEFg_Sko.js → index-DJ858Esn.js} +3 -3
  17. package/dist/{index-Cmshqsvw.js → index-DY4SlwLU.js} +3 -3
  18. package/dist/{index-DmLecJHe.js → index-DjDBKVpT.js} +3 -3
  19. package/dist/{index-CJis4XsK.js → index-DuBamk72.js} +3 -3
  20. package/dist/{index-DjfB4_mu.js → index-Hzb-PasG.js} +3 -3
  21. package/dist/{index-B87igDpg.js → index-Q0j8WhNV.js} +3 -3
  22. package/dist/{index-Dgcol-fP.js → index-r4kFXt3E.js} +3 -3
  23. package/dist/{index-QCS7rRjJ.js → index-yA1k0oVX.js} +3 -3
  24. package/dist/index.js +3 -3
  25. package/dist/lib/src/connection/foxglove-connection.d.ts.map +1 -1
  26. package/dist/lib/src/connection/foxglove-connection.js +7 -0
  27. package/dist/lib/src/connection/foxglove-connection.js.map +1 -1
  28. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts +1 -1
  29. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts.map +1 -1
  30. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js +28 -15
  31. package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js.map +1 -1
  32. package/dist/lib/src/panels/PointCloudPanel.d.ts.map +1 -1
  33. package/dist/lib/src/panels/PointCloudPanel.js +9 -8
  34. package/dist/lib/src/panels/PointCloudPanel.js.map +1 -1
  35. package/dist/lib/src/protobuf.generated/EncodedFrame.js +1 -1
  36. package/dist/lib/src/protobuf.generated/Event.js +1 -1
  37. package/dist/lib/src/protobuf.generated/IMUData.js +1 -1
  38. package/dist/lib/src/protobuf.generated/ImageAnnotations.js +1 -1
  39. package/dist/lib/src/protobuf.generated/ImgDetections.js +1 -1
  40. package/dist/lib/src/protobuf.generated/ImgFrame.js +1 -1
  41. package/dist/lib/src/protobuf.generated/PointCloudData.js +1 -1
  42. package/dist/lib/src/protobuf.generated/SpatialImgDetections.js +1 -1
  43. package/dist/lib/src/protobuf.generated/common.js +1 -1
  44. package/dist/lib/src/utils/poitcloud-sync.js +1 -1
  45. package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js +1 -1
  46. package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js.map +1 -1
  47. package/dist/packages/studio-base/src/panels/ThreeDeeRender/camera.js +3 -3
  48. package/dist/packages/studio-base/src/panels/ThreeDeeRender/camera.js.map +1 -1
  49. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.d.ts +5 -5
  50. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.d.ts.map +1 -1
  51. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.js +54 -21
  52. package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/CameraStateSettings.js.map +1 -1
  53. package/dist/{protobuf-Cr0sn6Ua.js → protobuf-By8duXQO.js} +7 -7
  54. package/dist/{worker-DMpdSxSr.js → worker-B7qK-cxf.js} +3 -3
  55. package/dist/{worker-C_ZGBh4B.js → worker-CzUjMpCN.js} +4 -4
  56. package/package.json +1 -1
@@ -435,14 +435,6 @@ function parseServerMessage(buffer) {
435
435
  }
436
436
 
437
437
  const textEncoder = new TextEncoder();
438
- /**
439
- * A client to interact with the Foxglove WebSocket protocol:
440
- * https://github.com/foxglove/ws-protocol/blob/main/docs/spec.md.
441
- *
442
- * You must provide the underlying websocket client (an implementation of `IWebSocket`) and that
443
- * client must advertise a subprotocol which is compatible with the ws-protocol spec (e.g.
444
- * "foxglove.websocket.v1").
445
- */
446
438
  class FoxgloveClient {
447
439
  static SUPPORTED_SUBPROTOCOL = "foxglove.websocket.v1";
448
440
  #emitter = new EventEmitter();
@@ -462,9 +454,12 @@ class FoxgloveClient {
462
454
  #reconnect() {
463
455
  this.#ws.binaryType = "arraybuffer";
464
456
  this.#ws.onerror = (event) => {
465
- this.#emitter.emit("error", event.error ?? new Error("WebSocket error"));
457
+ this.#emitter.emit("error", event.error);
466
458
  };
467
459
  this.#ws.onopen = (_event) => {
460
+ if (this.#ws.protocol !== FoxgloveClient.SUPPORTED_SUBPROTOCOL) {
461
+ throw new Error(`Expected subprotocol ${FoxgloveClient.SUPPORTED_SUBPROTOCOL}, got '${this.#ws.protocol}'`);
462
+ }
468
463
  this.#emitter.emit("open");
469
464
  };
470
465
  this.#ws.onmessage = (event) => {
@@ -488,9 +483,6 @@ class FoxgloveClient {
488
483
  case "status":
489
484
  this.#emitter.emit("status", message);
490
485
  return;
491
- case "removeStatus":
492
- this.#emitter.emit("removeStatus", message);
493
- return;
494
486
  case "advertise":
495
487
  this.#emitter.emit("advertise", message.channels);
496
488
  return;
@@ -509,9 +501,6 @@ class FoxgloveClient {
509
501
  case "connectionGraphUpdate":
510
502
  this.#emitter.emit("connectionGraphUpdate", message);
511
503
  return;
512
- case "serviceCallFailure":
513
- this.#emitter.emit("serviceCallFailure", message);
514
- return;
515
504
  case BinaryOpcode.MESSAGE_DATA:
516
505
  this.#emitter.emit("message", message);
517
506
  return;
@@ -1,4 +1,4 @@
1
- import { p as protobufsBySchema } from './protobuf-Cr0sn6Ua.js';
1
+ import { p as protobufsBySchema } from './protobuf-By8duXQO.js';
2
2
 
3
3
  // This Source Code Form is subject to the terms of the Mozilla Public
4
4
  // License, v2.0. If a copy of the MPL was not distributed with this
@@ -1,7 +1,7 @@
1
1
  import { e as expose } from './comlink-DHMAu6X7.js';
2
2
  import { t as typescript } from './useMessageReducer-jNx5e6JW.js';
3
3
  import { e as estimateObjectSize, d as dist } from './tslib.es6-C73eoP_E.js';
4
- import { T as Type, P as PointsAnnotationType, p as protobufsBySchema, a as Profile } from './protobuf-Cr0sn6Ua.js';
4
+ import { T as Type, P as PointsAnnotationType, p as protobufsBySchema, a as Profile } from './protobuf-By8duXQO.js';
5
5
  import 'react';
6
6
  import './_commonjsHelpers-E-ZsRS8r.js';
7
7
  import 'zustand';
@@ -1,4 +1,4 @@
1
- import { C as ClientBinaryOpcode, B as BinaryOpcode } from './FoxgloveServer-BssAO1ix.js';
1
+ import { C as ClientBinaryOpcode, B as BinaryOpcode } from './FoxgloveServer-C39Uooyk.js';
2
2
 
3
3
  // This Source Code Form is subject to the terms of the Mozilla Public
4
4
  // License, v2.0. If a copy of the MPL was not distributed with this
@@ -1,4 +1,4 @@
1
- import { a2 as ContextTracker, U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, M as foldNodeProp, ac as bracketMatchingHandle, T as LanguageSupport, a8 as EditorView, Z as syntaxTree, a9 as EditorSelection } from './index-BP8xet9G.js';
1
+ import { a3 as ContextTracker, V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, N as foldNodeProp, ad as bracketMatchingHandle, U as LanguageSupport, a9 as EditorView, $ as syntaxTree, aa as EditorSelection } from './index-BN96rKt2.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
@@ -7,9 +7,9 @@ import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
8
  import './comlink-DHMAu6X7.js';
9
9
  import './utils-Hzt3wxhG.js';
10
- import './FoxgloveServer-BssAO1ix.js';
10
+ import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
- import './foxglove-protocol-BQ1FsNfG.js';
12
+ import './foxglove-protocol-CYoMweAY.js';
13
13
  import 'react-dnd';
14
14
  import 'react-dnd-html5-backend';
15
15
  import './i18next-IYI3-Nuv.js';
@@ -1,4 +1,4 @@
1
- import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, aa as html, T as LanguageSupport, ab as parseMixed } from './index-BP8xet9G.js';
1
+ import { V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, ab as html, U as LanguageSupport, ac as parseMixed } from './index-BN96rKt2.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
@@ -7,9 +7,9 @@ import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
8
  import './comlink-DHMAu6X7.js';
9
9
  import './utils-Hzt3wxhG.js';
10
- import './FoxgloveServer-BssAO1ix.js';
10
+ import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
- import './foxglove-protocol-BQ1FsNfG.js';
12
+ import './foxglove-protocol-CYoMweAY.js';
13
13
  import 'react-dnd';
14
14
  import 'react-dnd-html5-backend';
15
15
  import './i18next-IYI3-Nuv.js';
@@ -1,4 +1,4 @@
1
- import { N as styleTags, O as tags, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, M as foldNodeProp, a1 as foldInside, a7 as defineCSSCompletionSource, T as LanguageSupport, V as LRParser, U as ExternalTokenizer } from './index-BP8xet9G.js';
1
+ import { O as styleTags, Q as tags, T as LRLanguage, K as indentNodeProp, M as continuedIndent, N as foldNodeProp, a2 as foldInside, a8 as defineCSSCompletionSource, U as LanguageSupport, X as LRParser, V as ExternalTokenizer } from './index-BN96rKt2.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
@@ -7,9 +7,9 @@ import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
8
  import './comlink-DHMAu6X7.js';
9
9
  import './utils-Hzt3wxhG.js';
10
- import './FoxgloveServer-BssAO1ix.js';
10
+ import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
- import './foxglove-protocol-BQ1FsNfG.js';
12
+ import './foxglove-protocol-CYoMweAY.js';
13
13
  import 'react-dnd';
14
14
  import 'react-dnd-html5-backend';
15
15
  import './i18next-IYI3-Nuv.js';
@@ -1,11 +1,11 @@
1
1
  import { d as dist$1, e as estimateObjectSize, r as reportError, A as AppError, b as baseFlatten, a as baseEach, c as baseIteratee, f as baseDifference, g as getTag, h as baseKeys, i as baseIsEqual, j as castPath, t as toKey, k as baseGet, l as hasIn, s as sendNotification, m as shallowequal, u as useGuaranteedContext, n as getPanelIdsInsideTabPanels, o as getPanelTypeFromId, T as TAB_PANEL_TYPE, p as removePanelFromTabPanel, q as getPanelIdForType, v as getPathFromNode, w as updateTabPanelLayout, x as getSaveConfigsPayloadForAddedPanel, y as replaceAndRemovePanels, z as inlineTabPanelLayouts, B as getAllPanelIds, C as getConfigsForNestedPanelsInsideTab, D as reorderTabWithinTabPanel, E as moveTabBetweenTabPanels, F as isTabPanelConfig, G as DEFAULT_TAB_PANEL_CONFIG, H as addPanelToTab, I as createAddUpdates, J as filterMap, L as Logger, K as uniq$2, M as useShallowMemo, N as CurrentLayoutContext, O as MessageOrderTracker, P as AppConfigurationContext, _ as __assign$7, Q as __rest$4, R as __spreadArray$4 } from './tslib.es6-C73eoP_E.js';
2
2
  import { w as wrap$3, p as proxy } from './comlink-DHMAu6X7.js';
3
3
  import { u as uint8ArrayToUint16Array } from './utils-Hzt3wxhG.js';
4
- import { B as BinaryOpcode } from './FoxgloveServer-BssAO1ix.js';
4
+ import { B as BinaryOpcode } from './FoxgloveServer-C39Uooyk.js';
5
5
  import { g as getDefaultExportFromCjs, c as commonjsGlobal } from './_commonjsHelpers-E-ZsRS8r.js';
6
6
  import * as React$1 from 'react';
7
7
  import React__default, { useRef, useMemo, createContext, useContext, forwardRef, createElement, useState, Component, useCallback, useEffect, useLayoutEffect, useReducer, useImperativeHandle, Fragment as Fragment$1, Suspense } from 'react';
8
- import { p as parseFoxgloveMessage } from './foxglove-protocol-BQ1FsNfG.js';
8
+ import { p as parseFoxgloveMessage } from './foxglove-protocol-CYoMweAY.js';
9
9
  import { DndProvider } from 'react-dnd';
10
10
  import { HTML5Backend } from 'react-dnd-html5-backend';
11
11
  import { getLeaves, createRemoveUpdate, updateTree, createHideUpdate, createDragToUpdates, getNodeAtPath, MosaicContext, MosaicWindowContext } from 'react-mosaic-component';
@@ -523,7 +523,10 @@ class ThroughputMetricsManager {
523
523
  /* eslint-disable @foxglove/strict-equality */
524
524
  const WORKER_COUNT = 4;
525
525
  const DEFAULT_TARGET_FPS = 9;
526
- const DEFAULT_MAX_PROCESSED_QUEUE_SIZE = 100;
526
+ const DEFAULT_MAX_PROCESSED_QUEUE_SIZE = 25;
527
+ const DISPATCH_INTERVAL_MS = 100; // The interval in which the pool will dispatch frames. NOTE: Lower values may result in lag spikes.
528
+ const DISPATCH_INTERVAL_FRACTION = 1000 / DISPATCH_INTERVAL_MS;
529
+ const MAX_BATCH_SIZE = 3;
527
530
  class DepthToPointcloudWorkerPool {
528
531
  lastUsedWorkerIndex = 0;
529
532
  #frameQueue = [];
@@ -532,14 +535,14 @@ class DepthToPointcloudWorkerPool {
532
535
  #metrics;
533
536
  #maximumStorageBufferSize;
534
537
  #FRAME_BATCH_SIZE;
535
- #targetDispatchIntervalMs;
536
538
  #maxProcessedQueueSize;
537
539
  #prevColorFrameWidth;
538
540
  #prevDepthFrameWidth;
539
541
  #dispatchCallback;
542
+ #targetDispatchIntervalMs;
540
543
  #isProcessing = false;
541
544
  #dispatchTimeoutId = undefined;
542
- constructor(callback, batchSize = 10, targetFps = DEFAULT_TARGET_FPS, maxProcessedQueueSize = DEFAULT_MAX_PROCESSED_QUEUE_SIZE) {
545
+ constructor(callback, batchSize = MAX_BATCH_SIZE, targetFps = DEFAULT_TARGET_FPS, maxProcessedQueueSize = DEFAULT_MAX_PROCESSED_QUEUE_SIZE) {
543
546
  if (typeof navigator.gpu !== "undefined") {
544
547
  void navigator.gpu.requestAdapter().then(gpuAdapter => {
545
548
  if (!gpuAdapter) {
@@ -563,7 +566,7 @@ class DepthToPointcloudWorkerPool {
563
566
  this.#prevColorFrameWidth = 0;
564
567
  this.#dispatchCallback = callback;
565
568
  this.#FRAME_BATCH_SIZE = Math.max(1, batchSize);
566
- this.#targetDispatchIntervalMs = 1000 / Math.max(1, targetFps);
569
+ this.#targetDispatchIntervalMs = DISPATCH_INTERVAL_MS / Math.max(1, Math.round(targetFps / DISPATCH_INTERVAL_FRACTION)) * this.#calculateBatchMultiplier();
567
570
  this.#maxProcessedQueueSize = Math.max(1, maxProcessedQueueSize);
568
571
  this.workerApis = new Array(WORKER_COUNT).fill(undefined).map(() => wrap$3(new Worker(new URL("pointcloudFromDepth.worker-hil48rbC.js", import.meta.url), {
569
572
  type: "module"
@@ -598,8 +601,9 @@ class DepthToPointcloudWorkerPool {
598
601
  if (currentOutSize > this.#maximumStorageBufferSize) {
599
602
  console.warn(`GPU queue size ${currentOutSize} exceeds maximum storage buffer size ${this.#maximumStorageBufferSize}. Reducing batch size.`);
600
603
  const frameBatchSize = Math.floor(this.#maximumStorageBufferSize / (numPixelsPerFrame * 16));
601
- this.#FRAME_BATCH_SIZE = Math.max(1, frameBatchSize);
604
+ this.#FRAME_BATCH_SIZE = Math.min(Math.max(1, frameBatchSize), MAX_BATCH_SIZE);
602
605
  if (frameBatchSize < 1) {
606
+ // We can't fit one color and depth frame in GPU memory. So it's better to fallback to CPU
603
607
  console.warn("Output buffer size is too small to process. Falling back to CPU.");
604
608
  this.#isWebGpuSupported = false;
605
609
  }
@@ -611,7 +615,7 @@ class DepthToPointcloudWorkerPool {
611
615
  this.#metrics?.registerEvent("pcl-pool.batchSent");
612
616
  const fps = this.#metrics?.calculate("pcl-pool.batchSent");
613
617
  if (fps && fps > 0) {
614
- this.#targetDispatchIntervalMs = 1000 / Math.max(4, fps);
618
+ this.#targetDispatchIntervalMs = DISPATCH_INTERVAL_MS / Math.max(1, Math.round(fps / DISPATCH_INTERVAL_FRACTION)) * this.#calculateBatchMultiplier();
615
619
  }
616
620
  if ((this.#isProcessing || this.#frameQueue.length < this.#FRAME_BATCH_SIZE) && !force) {
617
621
  return;
@@ -635,7 +639,7 @@ class DepthToPointcloudWorkerPool {
635
639
  const i420Height = firstFrame.i420Height;
636
640
  try {
637
641
  const depthDataArray = batchToProcess.map(f => uint8ArrayToUint16Array(f.depthFrame.data));
638
- // @ts-expect-error - ITS unknow
642
+ // @ts-expect-error - ITS unknown
639
643
  // eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
640
644
  const i420DataArray = batchToProcess.map(f => f.colorFrame.message.data);
641
645
  const workerIndex = this.lastUsedWorkerIndex;
@@ -701,11 +705,20 @@ class DepthToPointcloudWorkerPool {
701
705
  this.tryProcessBatch();
702
706
  }
703
707
  }
708
+ #calculateBatchMultiplier() {
709
+ if (this.#processedFrameQueue.length > this.#maxProcessedQueueSize / 2) {
710
+ return 1.2;
711
+ }
712
+ if (this.#processedFrameQueue.length >= this.#maxProcessedQueueSize - this.#maxProcessedQueueSize / 5) {
713
+ return 0.75;
714
+ }
715
+ return 1.3;
716
+ }
704
717
  #addToProcessedQueue(processedFrame) {
705
718
  if (this.#processedFrameQueue.length >= this.#maxProcessedQueueSize) {
706
719
  const fps = this.#metrics?.calculate("pcl-pool.batchSent");
707
720
  if (fps && fps > 0) {
708
- this.#targetDispatchIntervalMs = 1000 / Math.max(4, fps + 1);
721
+ this.#targetDispatchIntervalMs = DISPATCH_INTERVAL_MS / Math.max(1, Math.round(fps / DISPATCH_INTERVAL_FRACTION)) * this.#calculateBatchMultiplier();
709
722
  }
710
723
  this.#processedFrameQueue.shift();
711
724
  console.warn(`Processed frame queue full (>= ${this.#maxProcessedQueueSize}). Dropping oldest frame.`);
@@ -719,9 +732,13 @@ class DepthToPointcloudWorkerPool {
719
732
  if (this.#dispatchTimeoutId !== undefined) {
720
733
  clearTimeout(this.#dispatchTimeoutId);
721
734
  }
722
- if (this.#processedFrameQueue.length > 0) {
723
- this.#dispatchTimeoutId = setTimeout(this.#dispatchNextFrame, this.#targetDispatchIntervalMs);
724
- } else {
735
+ const fps = this.#metrics?.calculate("pcl-pool.batchSent");
736
+ if (fps && fps > 0) {
737
+ const MIN_DISPATCH_INTERVAL_MS = 100;
738
+ this.#targetDispatchIntervalMs = Math.min(MIN_DISPATCH_INTERVAL_MS, DISPATCH_INTERVAL_MS / Math.max(1, Math.round(fps / DISPATCH_INTERVAL_FRACTION)) * this.#calculateBatchMultiplier());
739
+ }
740
+ this.#dispatchTimeoutId = setTimeout(this.#dispatchNextFrame, this.#targetDispatchIntervalMs);
741
+ if (this.#processedFrameQueue.length <= 0) {
725
742
  this.#dispatchTimeoutId = undefined;
726
743
  }
727
744
  }
@@ -733,10 +750,8 @@ class DepthToPointcloudWorkerPool {
733
750
  } catch (error) {
734
751
  console.error("Error in dispatchCallback:", error);
735
752
  }
736
- } else {
737
- console.warn("Dispatch timer fired but processed queue was empty.");
738
753
  }
739
- this.#scheduleNextDispatch();
754
+ this.#dispatchTimeoutId = setTimeout(this.#dispatchNextFrame, this.#targetDispatchIntervalMs);
740
755
  };
741
756
  destroy() {
742
757
  if (this.#dispatchTimeoutId !== undefined) {
@@ -754,7 +769,7 @@ class DepthToPointcloudWorkerPool {
754
769
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
755
770
 
756
771
  function initWorker(callback) {
757
- const workerWrap = wrap$3(new Worker(new URL("deserialization.worker-DsCOJqEa.js", import.meta.url), {
772
+ const workerWrap = wrap$3(new Worker(new URL("deserialization.worker-d0xuPKYs.js", import.meta.url), {
758
773
  type: "module",
759
774
  name: `message-decoder`
760
775
  }));
@@ -843,7 +858,7 @@ class PoitCloudSyncFramework {
843
858
  };
844
859
  }
845
860
  storedFrames = [];
846
- #MAX_DELAY_SEC = 0.075;
861
+ #MAX_DELAY_SEC = 0.065;
847
862
  #MAX_STORED_FRAMES = 100;
848
863
  getFrame(nsec) {
849
864
  const {
@@ -1005,6 +1020,13 @@ class FoxgloveConnection {
1005
1020
  this.emitState();
1006
1021
  const poitcloudColorFrameName = this.subscribedTopics.get("_Point Cloud Color") ? "_Point Cloud Color" : "H.264 Stream";
1007
1022
  if (event.topic === poitcloudColorFrameName) {
1023
+ /* Good for performance testing
1024
+ const date = Date.now();
1025
+ event.publishTime= {
1026
+ sec: Math.floor(date / 1000),
1027
+ nsec: date *10 ** 6,
1028
+ };
1029
+ */
1008
1030
  void this.handleParsePoitcloudMessage(event);
1009
1031
  }
1010
1032
  }
@@ -19152,7 +19174,7 @@ class WebRtcBridge extends ArtificialWorker {
19152
19174
  constructor(automaticTokenRefresh) {
19153
19175
  super();
19154
19176
  this.automaticTokenRefresh = automaticTokenRefresh;
19155
- this.#worker = new Worker(new URL("worker-C_ZGBh4B.js", import.meta.url), {
19177
+ this.#worker = new Worker(new URL("worker-CzUjMpCN.js", import.meta.url), {
19156
19178
  type: "module"
19157
19179
  });
19158
19180
  this.#setupArtificialWorker();
@@ -19368,7 +19390,7 @@ class VisualizerConnection extends FoxgloveConnection {
19368
19390
  let worker;
19369
19391
  if (type === 'ws') {
19370
19392
  this.#url = data.connectionUrl;
19371
- worker = new Worker(new URL("worker-DMpdSxSr.js", import.meta.url), {
19393
+ worker = new Worker(new URL("worker-B7qK-cxf.js", import.meta.url), {
19372
19394
  type: "module"
19373
19395
  });
19374
19396
  } else {
@@ -85462,7 +85484,7 @@ function legacy(parser) {
85462
85484
  return new LanguageSupport(StreamLanguage.define(parser));
85463
85485
  }
85464
85486
  function sql$1(dialectName) {
85465
- return import('./index-QCS7rRjJ.js').then(m => m.sql({ dialect: m[dialectName] }));
85487
+ return import('./index-yA1k0oVX.js').then(m => m.sql({ dialect: m[dialectName] }));
85466
85488
  }
85467
85489
  /**
85468
85490
  An array of language descriptions for known language packages.
@@ -85473,7 +85495,7 @@ const languages = [
85473
85495
  name: "C",
85474
85496
  extensions: ["c", "h", "ino"],
85475
85497
  load() {
85476
- return import('./index-DKy3gbmW.js').then(m => m.cpp());
85498
+ return import('./index-BiuCJhwT.js').then(m => m.cpp());
85477
85499
  }
85478
85500
  }),
85479
85501
  /*@__PURE__*/LanguageDescription.of({
@@ -85481,7 +85503,7 @@ const languages = [
85481
85503
  alias: ["cpp"],
85482
85504
  extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
85483
85505
  load() {
85484
- return import('./index-DKy3gbmW.js').then(m => m.cpp());
85506
+ return import('./index-BiuCJhwT.js').then(m => m.cpp());
85485
85507
  }
85486
85508
  }),
85487
85509
  /*@__PURE__*/LanguageDescription.of({
@@ -85501,7 +85523,7 @@ const languages = [
85501
85523
  name: "Go",
85502
85524
  extensions: ["go"],
85503
85525
  load() {
85504
- return import('./index-Cmshqsvw.js').then(m => m.go());
85526
+ return import('./index-DY4SlwLU.js').then(m => m.go());
85505
85527
  }
85506
85528
  }),
85507
85529
  /*@__PURE__*/LanguageDescription.of({
@@ -85516,7 +85538,7 @@ const languages = [
85516
85538
  name: "Java",
85517
85539
  extensions: ["java"],
85518
85540
  load() {
85519
- return import('./index-D77uCBAO.js').then(m => m.java());
85541
+ return import('./index-CW4po4LY.js').then(m => m.java());
85520
85542
  }
85521
85543
  }),
85522
85544
  /*@__PURE__*/LanguageDescription.of({
@@ -85532,7 +85554,7 @@ const languages = [
85532
85554
  alias: ["json5"],
85533
85555
  extensions: ["json", "map"],
85534
85556
  load() {
85535
- return import('./index-DmLecJHe.js').then(m => m.json());
85557
+ return import('./index-DjDBKVpT.js').then(m => m.json());
85536
85558
  }
85537
85559
  }),
85538
85560
  /*@__PURE__*/LanguageDescription.of({
@@ -85546,14 +85568,14 @@ const languages = [
85546
85568
  name: "LESS",
85547
85569
  extensions: ["less"],
85548
85570
  load() {
85549
- return import('./index-uoDpeMpU.js').then(m => m.less());
85571
+ return import('./index-BL_I8-0V.js').then(m => m.less());
85550
85572
  }
85551
85573
  }),
85552
85574
  /*@__PURE__*/LanguageDescription.of({
85553
85575
  name: "Liquid",
85554
85576
  extensions: ["liquid"],
85555
85577
  load() {
85556
- return import('./index-B87igDpg.js').then(m => m.liquid());
85578
+ return import('./index-Q0j8WhNV.js').then(m => m.liquid());
85557
85579
  }
85558
85580
  }),
85559
85581
  /*@__PURE__*/LanguageDescription.of({
@@ -85579,7 +85601,7 @@ const languages = [
85579
85601
  name: "PHP",
85580
85602
  extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
85581
85603
  load() {
85582
- return import('./index-Bgt0P9DZ.js').then(m => m.php());
85604
+ return import('./index-BDyXMzQ6.js').then(m => m.php());
85583
85605
  }
85584
85606
  }),
85585
85607
  /*@__PURE__*/LanguageDescription.of({
@@ -85596,28 +85618,28 @@ const languages = [
85596
85618
  extensions: ["BUILD", "bzl", "py", "pyw"],
85597
85619
  filename: /^(BUCK|BUILD)$/,
85598
85620
  load() {
85599
- return import('./index-B_E0WpuE.js').then(m => m.python());
85621
+ return import('./index-C6r0_Z5X.js').then(m => m.python());
85600
85622
  }
85601
85623
  }),
85602
85624
  /*@__PURE__*/LanguageDescription.of({
85603
85625
  name: "Rust",
85604
85626
  extensions: ["rs"],
85605
85627
  load() {
85606
- return import('./index-WSsHQmbV.js').then(m => m.rust());
85628
+ return import('./index-CyuWa_3o.js').then(m => m.rust());
85607
85629
  }
85608
85630
  }),
85609
85631
  /*@__PURE__*/LanguageDescription.of({
85610
85632
  name: "Sass",
85611
85633
  extensions: ["sass"],
85612
85634
  load() {
85613
- return import('./index-CJis4XsK.js').then(m => m.sass({ indented: true }));
85635
+ return import('./index-DuBamk72.js').then(m => m.sass({ indented: true }));
85614
85636
  }
85615
85637
  }),
85616
85638
  /*@__PURE__*/LanguageDescription.of({
85617
85639
  name: "SCSS",
85618
85640
  extensions: ["scss"],
85619
85641
  load() {
85620
- return import('./index-CJis4XsK.js').then(m => m.sass());
85642
+ return import('./index-DuBamk72.js').then(m => m.sass());
85621
85643
  }
85622
85644
  }),
85623
85645
  /*@__PURE__*/LanguageDescription.of({
@@ -85648,7 +85670,7 @@ const languages = [
85648
85670
  name: "WebAssembly",
85649
85671
  extensions: ["wat", "wast"],
85650
85672
  load() {
85651
- return import('./index-Dgcol-fP.js').then(m => m.wast());
85673
+ return import('./index-r4kFXt3E.js').then(m => m.wast());
85652
85674
  }
85653
85675
  }),
85654
85676
  /*@__PURE__*/LanguageDescription.of({
@@ -85656,7 +85678,7 @@ const languages = [
85656
85678
  alias: ["rss", "wsdl", "xsd"],
85657
85679
  extensions: ["xml", "xsl", "xsd", "svg"],
85658
85680
  load() {
85659
- return import('./index-CDS7NmJ7.js').then(m => m.xml());
85681
+ return import('./index-B9ZvmN6i.js').then(m => m.xml());
85660
85682
  }
85661
85683
  }),
85662
85684
  /*@__PURE__*/LanguageDescription.of({
@@ -85664,7 +85686,7 @@ const languages = [
85664
85686
  alias: ["yml"],
85665
85687
  extensions: ["yaml", "yml"],
85666
85688
  load() {
85667
- return import('./index-BEFg_Sko.js').then(m => m.yaml());
85689
+ return import('./index-DJ858Esn.js').then(m => m.yaml());
85668
85690
  }
85669
85691
  }),
85670
85692
  // Legacy modes ported from CodeMirror 5
@@ -86460,13 +86482,13 @@ const languages = [
86460
86482
  name: "Vue",
86461
86483
  extensions: ["vue"],
86462
86484
  load() {
86463
- return import('./index-BRoKkcrX.js').then(m => m.vue());
86485
+ return import('./index-C_92hNxE.js').then(m => m.vue());
86464
86486
  }
86465
86487
  }),
86466
86488
  /*@__PURE__*/LanguageDescription.of({
86467
86489
  name: "Angular Template",
86468
86490
  load() {
86469
- return import('./index-DjfB4_mu.js').then(m => m.angular());
86491
+ return import('./index-Hzb-PasG.js').then(m => m.angular());
86470
86492
  }
86471
86493
  })
86472
86494
  ];
@@ -162565,7 +162587,7 @@ function createRenderDelaySampler() {
162565
162587
  };
162566
162588
  }
162567
162589
 
162568
- const ImagePanelComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-BgHqUgA4.js'));
162590
+ const ImagePanelComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-BpJwPs_P.js'));
162569
162591
  const ImagePanelBody = ({
162570
162592
  topic,
162571
162593
  frameRenderedEvent,
@@ -162642,7 +162664,24 @@ const ImagePanel = /*#__PURE__*/React__default.memo(function ImagePanel(props) {
162642
162664
  // License, v2.0. If a copy of the MPL was not distributed with this
162643
162665
  // file, You can obtain one at http://mozilla.org/MPL/2.0/
162644
162666
 
162645
- const ThreeDeeRenderComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-Bgmmj1v0.js'));
162667
+ const DEFAULT_CAMERA_STATE = {
162668
+ distance: -500,
162669
+ perspective: true,
162670
+ phi: 89,
162671
+ target: [0, 0, 0],
162672
+ targetOffset: [0, 0, 0],
162673
+ targetOrientation: [0, 1, 1, 1],
162674
+ thetaOffset: 180,
162675
+ fovy: 60,
162676
+ near: 2,
162677
+ far: 20000
162678
+ };
162679
+
162680
+ // This Source Code Form is subject to the terms of the Mozilla Public
162681
+ // License, v2.0. If a copy of the MPL was not distributed with this
162682
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/
162683
+
162684
+ const ThreeDeeRenderComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-BxwFQSQF.js'));
162646
162685
  const PointCloudPanelBody = ({
162647
162686
  topic,
162648
162687
  frameRenderedEvent
@@ -162671,16 +162710,16 @@ const PointCloudPanelBody = ({
162671
162710
  }
162672
162711
  },
162673
162712
  cameraState: {
162674
- distance: -1000,
162675
- perspective: true,
162713
+ distance: DEFAULT_CAMERA_STATE.distance,
162714
+ perspective: DEFAULT_CAMERA_STATE.perspective,
162676
162715
  phi: 89,
162677
- target: [0, 0, 0],
162678
- targetOffset: [0, 0, 0],
162679
- targetOrientation: [0, 1, 1, 1],
162680
- thetaOffset: 180,
162681
- fovy: getFovy(),
162682
- near: 5,
162683
- far: 20000
162716
+ target: DEFAULT_CAMERA_STATE.target,
162717
+ targetOffset: DEFAULT_CAMERA_STATE.targetOffset,
162718
+ targetOrientation: DEFAULT_CAMERA_STATE.targetOrientation,
162719
+ thetaOffset: DEFAULT_CAMERA_STATE.thetaOffset,
162720
+ near: DEFAULT_CAMERA_STATE.near,
162721
+ far: DEFAULT_CAMERA_STATE.far,
162722
+ fovy: getFovy()
162684
162723
  },
162685
162724
  imageMode: {
162686
162725
  colorMode: "rgba-fields"
@@ -162739,4 +162778,4 @@ const PointCloudPanel = /*#__PURE__*/React__default.memo(function PointCloudPane
162739
162778
  }));
162740
162779
  });
162741
162780
 
162742
- export { flatIndent as $, AnalyticsContext as A, PlayerCapabilities as B, assertNever as C, PlayerPresence as D, ErrorDisplay as E, isEqual as F, isDesktopApp as G, createTheme$1 as H, propTypesExports as I, indentNodeProp as J, continuedIndent as K, LeftSidebarItemKeys as L, foldNodeProp as M, styleTags as N, tags$1 as O, PropTypes as P, LRLanguage as Q, RightSidebarItemKeys as R, Stack$1 as S, LanguageSupport as T, ExternalTokenizer as U, LRParser as V, WorkspaceContext as W, ifNotIn as X, completeFromList as Y, syntaxTree as Z, _extends$3 as _, AppEvent as a, delimitedIndent as a0, foldInside as a1, ContextTracker as a2, LocalTokenGroup as a3, snippetCompletion as a4, IterMode as a5, NodeWeakMap as a6, defineCSSCompletionSource as a7, EditorView as a8, EditorSelection as a9, html$4 as aa, parseMixed as ab, bracketMatchingHandle as ac, javascriptLanguage as ad, VisualizerConnection as ae, VisualizerContext as af, PanelLayout as ag, ImagePanel as ah, PointCloudPanel as ai, EventMetricsManager as aj, ThroughputMetricsManager as ak, baseSet as b, createAggregator as c, useTranslation as d, usePanelCatalog as e, flatRest as f, generateUtilityClass as g, EmptyState as h, isEmpty as i, PanelContext as j, PanelCatalogContext as k, usePanelStateStore as l, makeStyles as m, useDefaultPanelTitle as n, useWorkspaceStore as o, WorkspaceStoreSelectors as p, difference as q, usePanelContext as r, useMessagePipeline as s, useHoverValue as t, useAnalytics as u, v4 as v, useSetHoverValue as w, useClearHoverValue as x, useMessagePipelineGetter as y, usePanelSettingsTreeUpdate as z };
162781
+ export { syntaxTree as $, AnalyticsContext as A, PlayerCapabilities as B, assertNever as C, PlayerPresence as D, ErrorDisplay as E, isEqual as F, isDesktopApp as G, createTheme$1 as H, propTypesExports as I, DEFAULT_CAMERA_STATE as J, indentNodeProp as K, LeftSidebarItemKeys as L, continuedIndent as M, foldNodeProp as N, styleTags as O, PropTypes as P, tags$1 as Q, RightSidebarItemKeys as R, Stack$1 as S, LRLanguage as T, LanguageSupport as U, ExternalTokenizer as V, WorkspaceContext as W, LRParser as X, ifNotIn as Y, completeFromList as Z, _extends$3 as _, AppEvent as a, flatIndent as a0, delimitedIndent as a1, foldInside as a2, ContextTracker as a3, LocalTokenGroup as a4, snippetCompletion as a5, IterMode as a6, NodeWeakMap as a7, defineCSSCompletionSource as a8, EditorView as a9, EditorSelection as aa, html$4 as ab, parseMixed as ac, bracketMatchingHandle as ad, javascriptLanguage as ae, VisualizerConnection as af, VisualizerContext as ag, PanelLayout as ah, ImagePanel as ai, PointCloudPanel as aj, EventMetricsManager as ak, ThroughputMetricsManager as al, baseSet as b, createAggregator as c, useTranslation as d, usePanelCatalog as e, flatRest as f, generateUtilityClass as g, EmptyState as h, isEmpty as i, PanelContext as j, PanelCatalogContext as k, usePanelStateStore as l, makeStyles as m, useDefaultPanelTitle as n, useWorkspaceStore as o, WorkspaceStoreSelectors as p, difference as q, usePanelContext as r, useMessagePipeline as s, useHoverValue as t, useAnalytics as u, v4 as v, useSetHoverValue as w, useClearHoverValue as x, useMessagePipelineGetter as y, usePanelSettingsTreeUpdate as z };
@@ -1,4 +1,4 @@
1
- import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-BP8xet9G.js';
1
+ import { V as ExternalTokenizer, O as styleTags, Q as tags, X as LRParser, T as LRLanguage, K as indentNodeProp, M as continuedIndent, a0 as flatIndent, a1 as delimitedIndent, N as foldNodeProp, a2 as foldInside, U as LanguageSupport } from './index-BN96rKt2.js';
2
2
  import './tslib.es6-C73eoP_E.js';
3
3
  import 'react';
4
4
  import 'react-mosaic-component';
@@ -7,9 +7,9 @@ import '@mui/material';
7
7
  import './isArrayLikeObject-Bytw9p-q.js';
8
8
  import './comlink-DHMAu6X7.js';
9
9
  import './utils-Hzt3wxhG.js';
10
- import './FoxgloveServer-BssAO1ix.js';
10
+ import './FoxgloveServer-C39Uooyk.js';
11
11
  import 'ms';
12
- import './foxglove-protocol-BQ1FsNfG.js';
12
+ import './foxglove-protocol-CYoMweAY.js';
13
13
  import 'react-dnd';
14
14
  import 'react-dnd-html5-backend';
15
15
  import './i18next-IYI3-Nuv.js';
@@ -1,4 +1,4 @@
1
- import { ImagePanel } from './index-Bgmmj1v0.js';
1
+ import { ImagePanel } from './index-BxwFQSQF.js';
2
2
  import 'react';
3
3
  import 'react-dom';
4
4
  import './tslib.es6-C73eoP_E.js';
@@ -7,12 +7,12 @@ import './_commonjsHelpers-E-ZsRS8r.js';
7
7
  import '@mui/material';
8
8
  import './isArrayLikeObject-Bytw9p-q.js';
9
9
  import 'zustand';
10
- import './index-BP8xet9G.js';
10
+ import './index-BN96rKt2.js';
11
11
  import './comlink-DHMAu6X7.js';
12
12
  import './utils-Hzt3wxhG.js';
13
- import './FoxgloveServer-BssAO1ix.js';
13
+ import './FoxgloveServer-C39Uooyk.js';
14
14
  import 'ms';
15
- import './foxglove-protocol-BQ1FsNfG.js';
15
+ import './foxglove-protocol-CYoMweAY.js';
16
16
  import 'react-dnd';
17
17
  import 'react-dnd-html5-backend';
18
18
  import './i18next-IYI3-Nuv.js';