@luxonis/visualizer-protobuf 3.1.12 → 3.1.14

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 (68) hide show
  1. package/dist/{FoxgloveServer-Da9kV1cr.js → FoxgloveServer-CpnCBMeV.js} +1 -1
  2. package/dist/{communicator-Dh2aL-rj.js → communicator-DO6hmBxI.js} +1 -1
  3. package/dist/{depth-DiD1V2Sg.js → depth-Me_0Xnx6.js} +89 -2
  4. package/dist/{deserialization.worker-CxHfbNSI.js → deserialization.worker-CUrCdjHf.js} +435 -154
  5. package/dist/{foxglove-protocol-BtLMVx24.js → foxglove-protocol-SrBOBs-8.js} +1 -1
  6. package/dist/{index-B5oN0fQm.js → index-5ZSfZI8d.js} +1 -1
  7. package/dist/{index-yO9F9DL5.js → index-B8aafdRQ.js} +5 -5
  8. package/dist/{index-gafqmUmi.js → index-BMew9qiQ.js} +57 -126
  9. package/dist/{index-BydKxany.js → index-BsIRFSYD.js} +36 -9
  10. package/dist/{index-B8JZ9tAh.js → index-CIhAU5Cs.js} +5 -5
  11. package/dist/{index-DuP_Wg3E.js → index-CN6tI-uI.js} +5 -5
  12. package/dist/{index-BFAcwVLJ.js → index-CQtXiN8I.js} +5 -5
  13. package/dist/{index-C-n27_wk.js → index-CZGEFE1k.js} +5 -5
  14. package/dist/{index-O1aT66OM.js → index-CeRrHeG_.js} +5 -5
  15. package/dist/{index-BtMMMbp8.js → index-CqH6rdRP.js} +5 -5
  16. package/dist/{index-CVrY6MoS.js → index-CrPun-aU.js} +5 -5
  17. package/dist/{index-9Qz76jnn.js → index-Dc3rS1Cf.js} +7 -7
  18. package/dist/{index-RxEWv1Fn.js → index-DgNYLOM9.js} +5 -5
  19. package/dist/{index-8bTMarZg.js → index-DjRF0u25.js} +5 -5
  20. package/dist/{index-CwAmHvi3.js → index-Dmc1065I.js} +5 -5
  21. package/dist/{index-BvC_JYBX.js → index-Dn6pTTdu.js} +5 -5
  22. package/dist/{index-DXdd6C_Q.js → index-N2I7Bhtx.js} +5 -5
  23. package/dist/{index-CQhsew4_.js → index-_Z7btKy-.js} +5 -5
  24. package/dist/{index-D_TjqfY9.js → index-_ggcs841.js} +5 -5
  25. package/dist/{index-oyn_LQK1.js → index-svPKcEP3.js} +5 -5
  26. package/dist/{index-DnaaNoIT.js → index-u1cGSF5c.js} +5 -5
  27. package/dist/index.js +5 -5
  28. package/dist/lib/src/components/PanelToolbar.d.ts.map +1 -1
  29. package/dist/lib/src/components/PanelToolbar.js +2 -2
  30. package/dist/lib/src/components/PanelToolbar.js.map +1 -1
  31. package/dist/lib/src/connection/foxglove-connection.d.ts.map +1 -1
  32. package/dist/lib/src/connection/foxglove-connection.js +12 -2
  33. package/dist/lib/src/connection/foxglove-connection.js.map +1 -1
  34. package/dist/lib/src/messaging/deserialization/pointcloud/pointcloudFromDepth.worker.js +59 -20
  35. package/dist/lib/src/messaging/deserialization/pointcloud/pointcloudFromDepth.worker.js.map +1 -1
  36. package/dist/lib/src/messaging/deserialization/pointcloud/utils.d.ts.map +1 -1
  37. package/dist/lib/src/messaging/deserialization/pointcloud/utils.js.map +1 -1
  38. package/dist/lib/src/messaging/deserialization/video/h264.d.ts +4 -1
  39. package/dist/lib/src/messaging/deserialization/video/h264.d.ts.map +1 -1
  40. package/dist/lib/src/messaging/deserialization/video/h264.js +25 -13
  41. package/dist/lib/src/messaging/deserialization/video/h264.js.map +1 -1
  42. package/dist/lib/src/messaging/deserialization/video/h265.d.ts +3 -0
  43. package/dist/lib/src/messaging/deserialization/video/h265.d.ts.map +1 -1
  44. package/dist/lib/src/messaging/deserialization/video/h265.js +21 -9
  45. package/dist/lib/src/messaging/deserialization/video/h265.js.map +1 -1
  46. package/dist/lib/src/messaging/deserialization/video/rgbd-to-pointcloud.d.ts +5 -5
  47. package/dist/lib/src/messaging/deserialization/video/rgbd-to-pointcloud.d.ts.map +1 -1
  48. package/dist/lib/src/messaging/deserialization/video/rgbd-to-pointcloud.js +362 -91
  49. package/dist/lib/src/messaging/deserialization/video/rgbd-to-pointcloud.js.map +1 -1
  50. package/dist/lib/src/messaging/protobuf.d.ts +2 -2
  51. package/dist/lib/src/messaging/protobuf.d.ts.map +1 -1
  52. package/dist/lib/src/messaging/protobuf.js +3 -3
  53. package/dist/lib/src/messaging/protobuf.js.map +1 -1
  54. package/dist/lib/src/utils/poitcloud-sync.d.ts +7 -2
  55. package/dist/lib/src/utils/poitcloud-sync.d.ts.map +1 -1
  56. package/dist/lib/src/utils/poitcloud-sync.js +10 -6
  57. package/dist/lib/src/utils/poitcloud-sync.js.map +1 -1
  58. package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.d.ts.map +1 -1
  59. package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.js +7 -2
  60. package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.js.map +1 -1
  61. package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.d.ts.map +1 -1
  62. package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js +33 -1
  63. package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js.map +1 -1
  64. package/dist/{pointcloudFromDepth.worker-60RA4Ief.js → pointcloudFromDepth.worker-wzSOsJVb.js} +86 -47
  65. package/dist/{protobuf-OcbVtxg1.js → protobuf-CKMA2Rn8.js} +214 -214
  66. package/dist/{worker-C2MHIq3t.js → worker-Bhe7uYcO.js} +4 -4
  67. package/dist/{worker-Be-hru8f.js → worker-VIU0v1ZW.js} +3 -3
  68. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { g as getDefaultExportFromCjs } from './protobuf-OcbVtxg1.js';
2
+ import { g as getDefaultExportFromCjs } from './protobuf-CKMA2Rn8.js';
3
3
  import require$$0 from 'ms';
4
4
 
5
5
  var eventemitter3 = {exports: {}};
@@ -1,5 +1,5 @@
1
1
  'use client';
2
- import { _ as _classPrivateFieldLooseBase, p as protobufsBySchema, b as _objectSpread2, a as _classPrivateFieldLooseKey } from './protobuf-OcbVtxg1.js';
2
+ import { _ as _classPrivateFieldLooseBase, p as protobufsBySchema, b as _objectSpread2, a as _classPrivateFieldLooseKey } from './protobuf-CKMA2Rn8.js';
3
3
  import { r as recordToDataView } from './encoding-jXImCIb4.js';
4
4
  import { L as Logger } from './logger-Bqy1nuLj.js';
5
5
 
@@ -1,6 +1,6 @@
1
1
  'use client';
2
2
  import { w as wrap, t as transfer } from './comlink-jf8bdrAf.js';
3
- import { f as commonjsGlobal, _ as _classPrivateFieldLooseBase, a as _classPrivateFieldLooseKey, g as getDefaultExportFromCjs, b as _objectSpread2, T as Type } from './protobuf-OcbVtxg1.js';
3
+ import { f as commonjsGlobal, _ as _classPrivateFieldLooseBase, a as _classPrivateFieldLooseKey, g as getDefaultExportFromCjs, b as _objectSpread2, T as Type } from './protobuf-CKMA2Rn8.js';
4
4
  import { L as Logger$2 } from './logger-Bqy1nuLj.js';
5
5
  import { useContext, useRef, createContext, useReducer, useLayoutEffect, useState, useCallback } from 'react';
6
6
  import 'zustand';
@@ -627,6 +627,93 @@ function estimateObjectSize(obj) {
627
627
  return SMALL_INTEGER_SIZE;
628
628
  }
629
629
 
630
+ // This Source Code Form is subject to the terms of the Mozilla Public
631
+ // License, v2.0. If a copy of the MPL was not distributed with this
632
+ // file, You can obtain one at http://mozilla.org/MPL/2.0/
633
+
634
+ const MAX_SAMPLE_SIZE = 100;
635
+ function constructKeyForTopicRenderMetrics(key, topic) {
636
+ return `${key}:${topic}`;
637
+ }
638
+ function bytesToMegabits(bytes) {
639
+ return bytes / (1024 * 1024) * 8;
640
+ }
641
+ class MetricsManager {
642
+ constructor() {
643
+ this.metrics = {};
644
+ }
645
+ getMetrics() {
646
+ return this.metrics;
647
+ }
648
+ }
649
+ class EventMetricsManager extends MetricsManager {
650
+ ensureTopic(topic) {
651
+ var _this$metrics, _this$metrics$topic;
652
+ (_this$metrics$topic = (_this$metrics = this.metrics)[topic]) !== null && _this$metrics$topic !== void 0 ? _this$metrics$topic : _this$metrics[topic] = [];
653
+ }
654
+ calculate(topic) {
655
+ const topicMetrics = this.metrics[topic];
656
+ if (!topicMetrics) {
657
+ return undefined;
658
+ }
659
+ let totalInterval = 0;
660
+ for (let i = 1; i < topicMetrics.length; ++i) {
661
+ totalInterval += topicMetrics[i - 1] - topicMetrics[i];
662
+ }
663
+ if (isNaN(totalInterval)) {
664
+ return undefined;
665
+ }
666
+ const fps = 1000 / (totalInterval / (topicMetrics.length - 1));
667
+ return Math.round(fps);
668
+ }
669
+ registerEvent(topic) {
670
+ const currentTime = performance.now();
671
+ this.ensureTopic(topic);
672
+ this.metrics[topic].unshift(currentTime);
673
+ if (this.metrics[topic].length > MAX_SAMPLE_SIZE) {
674
+ this.metrics[topic].length = MAX_SAMPLE_SIZE;
675
+ }
676
+ }
677
+ }
678
+ class ThroughputMetricsManager extends MetricsManager {
679
+ calculate(topic) {
680
+ const topicMetrics = this.metrics[topic];
681
+ if (!topicMetrics || topicMetrics.length < 2 || !topicMetrics.at(0) || !topicMetrics.at(-1)) {
682
+ return undefined;
683
+ }
684
+
685
+ // Get time span in seconds
686
+ // biome-ignore lint/style/noNonNullAssertion: <explanation>
687
+ const timeSpanMs = topicMetrics.at(0).timestamp - topicMetrics.at(-1).timestamp;
688
+ const timeSpanSec = timeSpanMs / 1000;
689
+ if (timeSpanSec === 0) {
690
+ return undefined;
691
+ }
692
+
693
+ // Sum up all values (bytes)
694
+ const totalBytes = topicMetrics.reduce((sum, metric) => sum + metric.value, 0);
695
+
696
+ // Calculate bytes per second
697
+ const bytesPerSecond = totalBytes / timeSpanSec;
698
+
699
+ // Return rounded value
700
+ return Number(bytesToMegabits(bytesPerSecond).toFixed(2));
701
+ }
702
+ registerEvent(topic, value) {
703
+ var _this$metrics2, _this$metrics2$topic;
704
+ const timestamp = performance.now();
705
+ (_this$metrics2$topic = (_this$metrics2 = this.metrics)[topic]) !== null && _this$metrics2$topic !== void 0 ? _this$metrics2$topic : _this$metrics2[topic] = [];
706
+ this.metrics[topic].unshift({
707
+ timestamp,
708
+ value
709
+ });
710
+ if (this.metrics[topic].length > MAX_SAMPLE_SIZE) {
711
+ this.metrics[topic].length = MAX_SAMPLE_SIZE;
712
+ }
713
+ }
714
+ }
715
+ const [globalInputEventMetricsManager, globalDecodeMetricsManager, globalRenderMetricsManager, globalThroughputMetricsManager] = [new EventMetricsManager(), new EventMetricsManager(), new EventMetricsManager(), new ThroughputMetricsManager()];
716
+
630
717
  const decodingErrorDefinitions = {
631
718
  UnsupportedTopic: {
632
719
  message: "This topic is not supported by the current decoder."
@@ -3925,4 +4012,4 @@ function getDistanceFromDepthDataForOffset(depthData, width, height, xOffset, yO
3925
4012
  return sum / count;
3926
4013
  }
3927
4014
 
3928
- export { isSymbol as $, AppError as A, inlineTabPanelLayouts as B, getAllPanelIds as C, DEFAULT_TAB_PANEL_CONFIG as D, getConfigsForNestedPanelsInsideTab as E, reorderTabWithinTabPanel as F, moveTabBetweenTabPanels as G, isTabPanelConfig as H, addPanelToTab as I, createAddUpdates as J, filterMap as K, Logger$1 as L, uniq as M, useShallowMemo as N, CurrentLayoutContext as O, MessageOrderTracker as P, AppConfigurationContext as Q, DecodingError as R, getDistanceFromDepthDataForOffset as S, TAB_PANEL_TYPE as T, parseMessage as U, fromMillis as V, DecoderRuntimeError as W, deserializeDepthFrame as X, UnsupportedTopicError as Y, NotInSecureContextError as Z, EncodedStreamNotSupportedError as _, baseEach as a, toString as a0, keys as a1, getSymbols as a2, stubArray as a3, arrayPush as a4, baseGetAllKeys as a5, getAllKeys as a6, arrayMap as a7, useCurrentLayoutActions as a8, useCurrentLayoutSelector as a9, usePanelMosaicId as aa, noop as ab, useSelectedPanels as ac, useAppConfiguration as ad, useJsonTreeTheme as ae, baseFlatten as b, createDecodingError as c, dist as d, estimateObjectSize as e, baseIteratee as f, baseDifference as g, getTag as h, baseKeys as i, baseIsEqual as j, castPath as k, baseGet as l, hasIn as m, shallowequal$1 as n, getPanelIdsInsideTabPanels as o, getPanelTypeFromId as p, removePanelFromTabPanel as q, reportError as r, sendNotification as s, toKey as t, useGuaranteedContext as u, getPanelIdForType as v, getPathFromNode as w, updateTabPanelLayout as x, getSaveConfigsPayloadForAddedPanel as y, replaceAndRemovePanels as z };
4015
+ export { DecoderRuntimeError as $, AppError as A, getPanelIdForType as B, getPathFromNode as C, updateTabPanelLayout as D, getSaveConfigsPayloadForAddedPanel as E, replaceAndRemovePanels as F, inlineTabPanelLayouts as G, getAllPanelIds as H, DEFAULT_TAB_PANEL_CONFIG as I, getConfigsForNestedPanelsInsideTab as J, reorderTabWithinTabPanel as K, moveTabBetweenTabPanels as L, isTabPanelConfig as M, addPanelToTab as N, createAddUpdates as O, filterMap as P, Logger$1 as Q, uniq as R, useShallowMemo as S, TAB_PANEL_TYPE as T, CurrentLayoutContext as U, MessageOrderTracker as V, AppConfigurationContext as W, DecodingError as X, getDistanceFromDepthDataForOffset as Y, parseMessage as Z, fromMillis as _, globalDecodeMetricsManager as a, deserializeDepthFrame as a0, UnsupportedTopicError as a1, NotInSecureContextError as a2, EncodedStreamNotSupportedError as a3, isSymbol as a4, toString as a5, keys as a6, getSymbols as a7, stubArray as a8, arrayPush as a9, baseGetAllKeys as aa, getAllKeys as ab, arrayMap as ac, useCurrentLayoutActions as ad, useCurrentLayoutSelector as ae, usePanelMosaicId as af, noop as ag, useSelectedPanels as ah, useAppConfiguration as ai, useJsonTreeTheme as aj, globalThroughputMetricsManager as b, constructKeyForTopicRenderMetrics as c, dist as d, estimateObjectSize as e, globalRenderMetricsManager as f, globalInputEventMetricsManager as g, createDecodingError as h, baseFlatten as i, baseEach as j, baseIteratee as k, baseDifference as l, getTag as m, baseKeys as n, baseIsEqual as o, castPath as p, baseGet as q, reportError as r, hasIn as s, toKey as t, sendNotification as u, shallowequal$1 as v, useGuaranteedContext as w, getPanelIdsInsideTabPanels as x, getPanelTypeFromId as y, removePanelFromTabPanel as z };