@luxonis/visualizer-protobuf 2.25.0 → 2.26.0
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.
- package/dist/{index-jxrL_e5O.js → index-AHg_yzKN.js} +1 -1
- package/dist/{index-XeyUYY6F.js → index-B2-O30qH.js} +1 -1
- package/dist/{index-CHN-su-T.js → index-BGrTBljs.js} +1 -1
- package/dist/{index-BshEtuHO.js → index-BQnK1LTP.js} +1 -1
- package/dist/{index-DFjClLW-.js → index-BTdZSETz.js} +1 -1
- package/dist/{index-DWrX4gRf.js → index-CP4Zviq2.js} +1 -1
- package/dist/{index-CpNfgd1w.js → index-CPTbtbj3.js} +149 -65
- package/dist/{index-CWe6_z0e.js → index-Cia95HmM.js} +1 -1
- package/dist/{index-Yd8mYo4X.js → index-CkN9fMlH.js} +1 -1
- package/dist/{index-2PbGVouo.js → index-CqMDGXcF.js} +1 -1
- package/dist/{index-DuCWx5b9.js → index-DFHs4aUN.js} +1 -1
- package/dist/{index-F42wp6uI.js → index-DLRgXO8y.js} +1 -1
- package/dist/{index-BlPNVFW_.js → index-DMzCNF_e.js} +1 -1
- package/dist/{index-3GQM86WK.js → index-DcFvTNvR.js} +1 -1
- package/dist/{index-C4kNkDQc.js → index-NiMrvEhw.js} +2 -2
- package/dist/{index-D3DkLyZA.js → index-Zijk5SvX.js} +1 -1
- package/dist/{index-9gGX6Zvk.js → index-cLRC4uIT.js} +1 -1
- package/dist/{index-BhITngB2.js → index-i-2ofHyT.js} +1 -1
- package/dist/{index-DeEImmkI.js → index-ttl4cqP0.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts +4 -4
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.d.ts.map +1 -1
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js +133 -45
- package/dist/lib/src/messaging/deserialization/pointcloud/poitcloudPoolManager.js.map +1 -1
- package/dist/lib/src/utils/poitcloud-sync.js +1 -1
- package/dist/lib/src/utils/poitcloud-sync.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, a3 as LocalTokenGroup, a4 as snippetCompletion, Z as syntaxTree, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, X as ifNotIn, Y as completeFromList, a5 as IterMode, a6 as NodeWeakMap } from './index-
|
|
1
|
+
import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, a3 as LocalTokenGroup, a4 as snippetCompletion, Z as syntaxTree, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, $ as flatIndent, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, X as ifNotIn, Y as completeFromList, a5 as IterMode, a6 as NodeWeakMap } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -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, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, ab as parseMixed } from './index-
|
|
1
|
+
import { a2 as ContextTracker, U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, ab as parseMixed } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as styleTags, O as tags, ad as javascriptLanguage, Q as LRLanguage, T as LanguageSupport, V as LRParser, aa as html, ab as parseMixed, U as ExternalTokenizer } from './index-
|
|
1
|
+
import { N as styleTags, O as tags, ad as javascriptLanguage, Q as LRLanguage, T as LanguageSupport, V as LRParser, aa as html, ab as parseMixed, U as ExternalTokenizer } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a8 as EditorView, a9 as EditorSelection, Q as LRLanguage, N as styleTags, O as tags, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, T as LanguageSupport, V as LRParser, Z as syntaxTree, aa as html, ab as parseMixed, U as ExternalTokenizer } from './index-
|
|
1
|
+
import { a8 as EditorView, a9 as EditorSelection, Q as LRLanguage, N as styleTags, O as tags, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, T as LanguageSupport, V as LRParser, Z as syntaxTree, aa as html, ab as parseMixed, U as ExternalTokenizer } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, Z as syntaxTree, X as ifNotIn, Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, a5 as IterMode, Y as completeFromList, a6 as NodeWeakMap, a4 as snippetCompletion } from './index-
|
|
1
|
+
import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, Z as syntaxTree, X as ifNotIn, Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport, a5 as IterMode, Y as completeFromList, a6 as NodeWeakMap, a4 as snippetCompletion } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -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, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-
|
|
1
|
+
import { U as ExternalTokenizer, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -447,36 +447,52 @@ class Condvar {
|
|
|
447
447
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
448
448
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
449
449
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
450
|
+
/* eslint-disable @foxglove/strict-equality */
|
|
450
451
|
const WORKER_COUNT = 4;
|
|
452
|
+
const DEFAULT_TARGET_FPS = 25;
|
|
453
|
+
const DEFAULT_MAX_PROCESSED_QUEUE_SIZE = 60;
|
|
451
454
|
class DepthToPointcloudWorkerPool {
|
|
452
455
|
lastUsedWorkerIndex = 0;
|
|
453
456
|
#frameQueue = [];
|
|
457
|
+
#processedFrameQueue = [];
|
|
454
458
|
#isWebGpuSupported = false;
|
|
455
459
|
#FRAME_BATCH_SIZE;
|
|
460
|
+
#targetDispatchIntervalMs;
|
|
461
|
+
#maxProcessedQueueSize;
|
|
462
|
+
#dispatchCallback;
|
|
456
463
|
#isProcessing = false;
|
|
457
|
-
|
|
464
|
+
#dispatchTimeoutId = undefined;
|
|
465
|
+
constructor(callback, batchSize = 10, targetFps = DEFAULT_TARGET_FPS, maxProcessedQueueSize = DEFAULT_MAX_PROCESSED_QUEUE_SIZE) {
|
|
458
466
|
if (typeof navigator.gpu !== "undefined") {
|
|
459
467
|
void navigator.gpu.requestAdapter().then(gpuAdapter => {
|
|
460
468
|
if (!gpuAdapter) {
|
|
461
469
|
this.#isWebGpuSupported = false;
|
|
462
|
-
console.warn("WebGPU not
|
|
463
|
-
|
|
470
|
+
console.warn("WebGPU adapter not found. Falling back to CPU for all frames.");
|
|
471
|
+
} else {
|
|
472
|
+
this.#isWebGpuSupported = true;
|
|
473
|
+
// console.info("WebGPU potentially supported. Will attempt GPU processing."); // Console log removed as per no-comment request style
|
|
464
474
|
}
|
|
465
|
-
|
|
475
|
+
}).catch(err => {
|
|
476
|
+
console.warn("Error requesting WebGPU adapter. Falling back to CPU.", err);
|
|
477
|
+
this.#isWebGpuSupported = false;
|
|
466
478
|
});
|
|
467
479
|
} else {
|
|
468
|
-
console.warn("WebGPU not supported. Falling back to CPU for all frames.");
|
|
480
|
+
console.warn("navigator.gpu is undefined. WebGPU not supported. Falling back to CPU for all frames.");
|
|
481
|
+
this.#isWebGpuSupported = false;
|
|
469
482
|
}
|
|
470
|
-
this
|
|
483
|
+
this.#dispatchCallback = callback;
|
|
471
484
|
this.#FRAME_BATCH_SIZE = Math.max(1, batchSize);
|
|
485
|
+
this.#targetDispatchIntervalMs = 1000 / Math.max(1, targetFps);
|
|
486
|
+
this.#maxProcessedQueueSize = Math.max(1, maxProcessedQueueSize);
|
|
472
487
|
this.workerApis = new Array(WORKER_COUNT).fill(undefined).map(() => wrap$3(new Worker(new URL("pointcloudFromDepth.worker-JVTJ-r5q.js", import.meta.url), {
|
|
473
488
|
type: "module"
|
|
474
489
|
})));
|
|
475
490
|
}
|
|
476
491
|
async queueDepthFrame(data) {
|
|
477
|
-
// @ts-expect-error -
|
|
478
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-
|
|
479
|
-
if (!(data.colorFrame.message
|
|
492
|
+
// @ts-expect-error - message structure not fully typed here
|
|
493
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
494
|
+
if (!(data.colorFrame.message?.data instanceof Uint8Array)) {
|
|
495
|
+
console.warn("Skipping frame: colorFrame.message.data is not a Uint8Array", data.colorFrame);
|
|
480
496
|
return;
|
|
481
497
|
}
|
|
482
498
|
this.#frameQueue.push(data);
|
|
@@ -492,6 +508,7 @@ class DepthToPointcloudWorkerPool {
|
|
|
492
508
|
this.#isProcessing = false;
|
|
493
509
|
return;
|
|
494
510
|
}
|
|
511
|
+
|
|
495
512
|
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
496
513
|
const firstFrame = batchToProcess[0];
|
|
497
514
|
const width = firstFrame.width;
|
|
@@ -502,47 +519,114 @@ class DepthToPointcloudWorkerPool {
|
|
|
502
519
|
const cy = firstFrame.cy;
|
|
503
520
|
const i420Width = firstFrame.i420Width;
|
|
504
521
|
const i420Height = firstFrame.i420Height;
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
522
|
+
try {
|
|
523
|
+
const depthDataArray = batchToProcess.map(f => uint8ArrayToUint16Array(f.depthFrame.data));
|
|
524
|
+
// @ts-expect-error - message structure not fully typed here - ITS UNKNOWN
|
|
525
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
526
|
+
const i420DataArray = batchToProcess.map(f => f.colorFrame.message.data);
|
|
527
|
+
const workerIndex = this.lastUsedWorkerIndex;
|
|
528
|
+
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
529
|
+
const workerApi = this.workerApis[workerIndex];
|
|
530
|
+
this.lastUsedWorkerIndex = (this.lastUsedWorkerIndex + 1) % WORKER_COUNT;
|
|
531
|
+
workerApi.depthToPointcloudGPU(depthDataArray, width, height, fx, fy, cx, cy, i420DataArray, i420Width, i420Height, {
|
|
532
|
+
hasGPU: this.#isWebGpuSupported
|
|
533
|
+
}).then(results => {
|
|
534
|
+
if (results.length === batchToProcess.length) {
|
|
535
|
+
for (let i = 0; i < results.length; i++) {
|
|
536
|
+
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
537
|
+
const originalFrame = batchToProcess[i];
|
|
538
|
+
const pointCloudResult = results[i];
|
|
539
|
+
if (!pointCloudResult) {
|
|
540
|
+
// console.warn(`Worker ${workerIndex}: Result ${i} is null or undefined. Passing null to callback.`); // Console log removed
|
|
541
|
+
this.#addToProcessedQueue({
|
|
542
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
543
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
544
|
+
processedPointCloud: null
|
|
545
|
+
});
|
|
546
|
+
} else {
|
|
547
|
+
this.#addToProcessedQueue({
|
|
548
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
549
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
550
|
+
processedPointCloud: pointCloudResult
|
|
551
|
+
});
|
|
552
|
+
}
|
|
553
|
+
}
|
|
554
|
+
} else {
|
|
555
|
+
console.error(`Worker ${workerIndex}: Mismatch in result count (${results.length}) and batch size (${batchToProcess.length}). Discarding results for this batch.`);
|
|
556
|
+
for (const originalFrame of batchToProcess) {
|
|
557
|
+
this.#addToProcessedQueue({
|
|
558
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
559
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
560
|
+
processedPointCloud: null
|
|
561
|
+
});
|
|
529
562
|
}
|
|
530
|
-
// biome-ignore lint/style/noNonNullAssertion: Workaround
|
|
531
|
-
const delay = Math.min(500, Math.abs((firstFrame.colorFrame.receiveTime.nsec - timestampsArray[i]) / 10 ** 6));
|
|
532
|
-
setTimeout(() => {
|
|
533
|
-
this.sumbmitCallback(originalFrame.colorFrame, originalFrame.depthFrame, pointCloudResult);
|
|
534
|
-
}, delay);
|
|
535
563
|
}
|
|
536
|
-
}
|
|
537
|
-
|
|
538
|
-
|
|
564
|
+
}).catch(error => {
|
|
565
|
+
console.error(`Worker ${workerIndex}: Error processing batch:`, error);
|
|
566
|
+
for (const originalFrame of batchToProcess) {
|
|
567
|
+
this.#addToProcessedQueue({
|
|
568
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
569
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
570
|
+
processedPointCloud: null
|
|
571
|
+
});
|
|
572
|
+
}
|
|
573
|
+
}).finally(() => {
|
|
574
|
+
this.#isProcessing = false;
|
|
575
|
+
this.tryProcessBatch();
|
|
576
|
+
});
|
|
577
|
+
} catch (error) {
|
|
578
|
+
console.error("Error preparing data for worker:", error);
|
|
539
579
|
for (const originalFrame of batchToProcess) {
|
|
540
|
-
this
|
|
580
|
+
this.#addToProcessedQueue({
|
|
581
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
582
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
583
|
+
processedPointCloud: null
|
|
584
|
+
});
|
|
541
585
|
}
|
|
542
|
-
}).finally(() => {
|
|
543
586
|
this.#isProcessing = false;
|
|
544
587
|
this.tryProcessBatch();
|
|
545
|
-
}
|
|
588
|
+
}
|
|
589
|
+
}
|
|
590
|
+
#addToProcessedQueue(processedFrame) {
|
|
591
|
+
if (this.#processedFrameQueue.length >= this.#maxProcessedQueueSize) {
|
|
592
|
+
this.#processedFrameQueue.shift();
|
|
593
|
+
console.warn(`Processed frame queue full (>= ${this.#maxProcessedQueueSize}). Dropping oldest frame.`);
|
|
594
|
+
}
|
|
595
|
+
this.#processedFrameQueue.push(processedFrame);
|
|
596
|
+
if (this.#dispatchTimeoutId === undefined) {
|
|
597
|
+
this.#scheduleNextDispatch();
|
|
598
|
+
}
|
|
599
|
+
}
|
|
600
|
+
#scheduleNextDispatch() {
|
|
601
|
+
if (this.#dispatchTimeoutId !== undefined) {
|
|
602
|
+
clearTimeout(this.#dispatchTimeoutId);
|
|
603
|
+
}
|
|
604
|
+
if (this.#processedFrameQueue.length > 0) {
|
|
605
|
+
this.#dispatchTimeoutId = setTimeout(this.#dispatchNextFrame, this.#targetDispatchIntervalMs);
|
|
606
|
+
} else {
|
|
607
|
+
this.#dispatchTimeoutId = undefined;
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
#dispatchNextFrame = () => {
|
|
611
|
+
const frameToDispatch = this.#processedFrameQueue.shift();
|
|
612
|
+
if (frameToDispatch) {
|
|
613
|
+
try {
|
|
614
|
+
this.#dispatchCallback(frameToDispatch.originalColorEvent, frameToDispatch.originalDepthFrame, frameToDispatch.processedPointCloud);
|
|
615
|
+
} catch (error) {
|
|
616
|
+
console.error("Error in dispatchCallback:", error);
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
this.#scheduleNextDispatch();
|
|
620
|
+
};
|
|
621
|
+
destroy() {
|
|
622
|
+
if (this.#dispatchTimeoutId !== undefined) {
|
|
623
|
+
clearTimeout(this.#dispatchTimeoutId);
|
|
624
|
+
this.#dispatchTimeoutId = undefined;
|
|
625
|
+
}
|
|
626
|
+
this.#frameQueue = [];
|
|
627
|
+
this.#processedFrameQueue = [];
|
|
628
|
+
// biome-ignore lint/complexity/noForEach: Simple cleanup loop
|
|
629
|
+
this.workerApis = [];
|
|
546
630
|
}
|
|
547
631
|
}
|
|
548
632
|
|
|
@@ -709,7 +793,7 @@ class PoitCloudSyncFramework {
|
|
|
709
793
|
};
|
|
710
794
|
}
|
|
711
795
|
storedFrames = [];
|
|
712
|
-
#MAX_DELAY_SEC = 0.
|
|
796
|
+
#MAX_DELAY_SEC = 0.075;
|
|
713
797
|
#MAX_STORED_FRAMES = 100;
|
|
714
798
|
getFrame(nsec) {
|
|
715
799
|
const {
|
|
@@ -85313,7 +85397,7 @@ function legacy(parser) {
|
|
|
85313
85397
|
return new LanguageSupport(StreamLanguage.define(parser));
|
|
85314
85398
|
}
|
|
85315
85399
|
function sql$1(dialectName) {
|
|
85316
|
-
return import('./index-
|
|
85400
|
+
return import('./index-ttl4cqP0.js').then(m => m.sql({ dialect: m[dialectName] }));
|
|
85317
85401
|
}
|
|
85318
85402
|
/**
|
|
85319
85403
|
An array of language descriptions for known language packages.
|
|
@@ -85324,7 +85408,7 @@ const languages = [
|
|
|
85324
85408
|
name: "C",
|
|
85325
85409
|
extensions: ["c", "h", "ino"],
|
|
85326
85410
|
load() {
|
|
85327
|
-
return import('./index-
|
|
85411
|
+
return import('./index-i-2ofHyT.js').then(m => m.cpp());
|
|
85328
85412
|
}
|
|
85329
85413
|
}),
|
|
85330
85414
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85332,7 +85416,7 @@ const languages = [
|
|
|
85332
85416
|
alias: ["cpp"],
|
|
85333
85417
|
extensions: ["cpp", "c++", "cc", "cxx", "hpp", "h++", "hh", "hxx"],
|
|
85334
85418
|
load() {
|
|
85335
|
-
return import('./index-
|
|
85419
|
+
return import('./index-i-2ofHyT.js').then(m => m.cpp());
|
|
85336
85420
|
}
|
|
85337
85421
|
}),
|
|
85338
85422
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85352,7 +85436,7 @@ const languages = [
|
|
|
85352
85436
|
name: "Go",
|
|
85353
85437
|
extensions: ["go"],
|
|
85354
85438
|
load() {
|
|
85355
|
-
return import('./index-
|
|
85439
|
+
return import('./index-AHg_yzKN.js').then(m => m.go());
|
|
85356
85440
|
}
|
|
85357
85441
|
}),
|
|
85358
85442
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85367,7 +85451,7 @@ const languages = [
|
|
|
85367
85451
|
name: "Java",
|
|
85368
85452
|
extensions: ["java"],
|
|
85369
85453
|
load() {
|
|
85370
|
-
return import('./index-
|
|
85454
|
+
return import('./index-CqMDGXcF.js').then(m => m.java());
|
|
85371
85455
|
}
|
|
85372
85456
|
}),
|
|
85373
85457
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85383,7 +85467,7 @@ const languages = [
|
|
|
85383
85467
|
alias: ["json5"],
|
|
85384
85468
|
extensions: ["json", "map"],
|
|
85385
85469
|
load() {
|
|
85386
|
-
return import('./index-
|
|
85470
|
+
return import('./index-DMzCNF_e.js').then(m => m.json());
|
|
85387
85471
|
}
|
|
85388
85472
|
}),
|
|
85389
85473
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85397,14 +85481,14 @@ const languages = [
|
|
|
85397
85481
|
name: "LESS",
|
|
85398
85482
|
extensions: ["less"],
|
|
85399
85483
|
load() {
|
|
85400
|
-
return import('./index-
|
|
85484
|
+
return import('./index-Zijk5SvX.js').then(m => m.less());
|
|
85401
85485
|
}
|
|
85402
85486
|
}),
|
|
85403
85487
|
/*@__PURE__*/LanguageDescription.of({
|
|
85404
85488
|
name: "Liquid",
|
|
85405
85489
|
extensions: ["liquid"],
|
|
85406
85490
|
load() {
|
|
85407
|
-
return import('./index-
|
|
85491
|
+
return import('./index-BQnK1LTP.js').then(m => m.liquid());
|
|
85408
85492
|
}
|
|
85409
85493
|
}),
|
|
85410
85494
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85430,7 +85514,7 @@ const languages = [
|
|
|
85430
85514
|
name: "PHP",
|
|
85431
85515
|
extensions: ["php", "php3", "php4", "php5", "php7", "phtml"],
|
|
85432
85516
|
load() {
|
|
85433
|
-
return import('./index-
|
|
85517
|
+
return import('./index-DLRgXO8y.js').then(m => m.php());
|
|
85434
85518
|
}
|
|
85435
85519
|
}),
|
|
85436
85520
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85447,28 +85531,28 @@ const languages = [
|
|
|
85447
85531
|
extensions: ["BUILD", "bzl", "py", "pyw"],
|
|
85448
85532
|
filename: /^(BUCK|BUILD)$/,
|
|
85449
85533
|
load() {
|
|
85450
|
-
return import('./index-
|
|
85534
|
+
return import('./index-BTdZSETz.js').then(m => m.python());
|
|
85451
85535
|
}
|
|
85452
85536
|
}),
|
|
85453
85537
|
/*@__PURE__*/LanguageDescription.of({
|
|
85454
85538
|
name: "Rust",
|
|
85455
85539
|
extensions: ["rs"],
|
|
85456
85540
|
load() {
|
|
85457
|
-
return import('./index-
|
|
85541
|
+
return import('./index-CP4Zviq2.js').then(m => m.rust());
|
|
85458
85542
|
}
|
|
85459
85543
|
}),
|
|
85460
85544
|
/*@__PURE__*/LanguageDescription.of({
|
|
85461
85545
|
name: "Sass",
|
|
85462
85546
|
extensions: ["sass"],
|
|
85463
85547
|
load() {
|
|
85464
|
-
return import('./index-
|
|
85548
|
+
return import('./index-cLRC4uIT.js').then(m => m.sass({ indented: true }));
|
|
85465
85549
|
}
|
|
85466
85550
|
}),
|
|
85467
85551
|
/*@__PURE__*/LanguageDescription.of({
|
|
85468
85552
|
name: "SCSS",
|
|
85469
85553
|
extensions: ["scss"],
|
|
85470
85554
|
load() {
|
|
85471
|
-
return import('./index-
|
|
85555
|
+
return import('./index-cLRC4uIT.js').then(m => m.sass());
|
|
85472
85556
|
}
|
|
85473
85557
|
}),
|
|
85474
85558
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85499,7 +85583,7 @@ const languages = [
|
|
|
85499
85583
|
name: "WebAssembly",
|
|
85500
85584
|
extensions: ["wat", "wast"],
|
|
85501
85585
|
load() {
|
|
85502
|
-
return import('./index-
|
|
85586
|
+
return import('./index-DcFvTNvR.js').then(m => m.wast());
|
|
85503
85587
|
}
|
|
85504
85588
|
}),
|
|
85505
85589
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85507,7 +85591,7 @@ const languages = [
|
|
|
85507
85591
|
alias: ["rss", "wsdl", "xsd"],
|
|
85508
85592
|
extensions: ["xml", "xsl", "xsd", "svg"],
|
|
85509
85593
|
load() {
|
|
85510
|
-
return import('./index-
|
|
85594
|
+
return import('./index-CkN9fMlH.js').then(m => m.xml());
|
|
85511
85595
|
}
|
|
85512
85596
|
}),
|
|
85513
85597
|
/*@__PURE__*/LanguageDescription.of({
|
|
@@ -85515,7 +85599,7 @@ const languages = [
|
|
|
85515
85599
|
alias: ["yml"],
|
|
85516
85600
|
extensions: ["yaml", "yml"],
|
|
85517
85601
|
load() {
|
|
85518
|
-
return import('./index-
|
|
85602
|
+
return import('./index-B2-O30qH.js').then(m => m.yaml());
|
|
85519
85603
|
}
|
|
85520
85604
|
}),
|
|
85521
85605
|
// Legacy modes ported from CodeMirror 5
|
|
@@ -86311,13 +86395,13 @@ const languages = [
|
|
|
86311
86395
|
name: "Vue",
|
|
86312
86396
|
extensions: ["vue"],
|
|
86313
86397
|
load() {
|
|
86314
|
-
return import('./index-
|
|
86398
|
+
return import('./index-DFHs4aUN.js').then(m => m.vue());
|
|
86315
86399
|
}
|
|
86316
86400
|
}),
|
|
86317
86401
|
/*@__PURE__*/LanguageDescription.of({
|
|
86318
86402
|
name: "Angular Template",
|
|
86319
86403
|
load() {
|
|
86320
|
-
return import('./index-
|
|
86404
|
+
return import('./index-BGrTBljs.js').then(m => m.angular());
|
|
86321
86405
|
}
|
|
86322
86406
|
})
|
|
86323
86407
|
];
|
|
@@ -162387,7 +162471,7 @@ function createRenderDelaySampler() {
|
|
|
162387
162471
|
};
|
|
162388
162472
|
}
|
|
162389
162473
|
|
|
162390
|
-
const ImagePanelComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-
|
|
162474
|
+
const ImagePanelComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-NiMrvEhw.js'));
|
|
162391
162475
|
const ImagePanelBody = ({
|
|
162392
162476
|
topic,
|
|
162393
162477
|
frameRenderedEvent
|
|
@@ -162456,7 +162540,7 @@ const ImagePanel = /*#__PURE__*/React__default.memo(function ImagePanel(props) {
|
|
|
162456
162540
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
162457
162541
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
162458
162542
|
|
|
162459
|
-
const ThreeDeeRenderComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-
|
|
162543
|
+
const ThreeDeeRenderComponent = /*#__PURE__*/React__default.lazy(async () => await import('./index-Cia95HmM.js'));
|
|
162460
162544
|
const PointCloudPanelBody = ({
|
|
162461
162545
|
topic,
|
|
162462
162546
|
frameRenderedEvent
|
|
@@ -3,7 +3,7 @@ import React__default, { useReducer, useRef, useCallback, useLayoutEffect, Compo
|
|
|
3
3
|
import ReactDOM__default from 'react-dom';
|
|
4
4
|
import { S as isSymbol, U as toString, V as keys, W as getSymbols$1, X as stubArray, Y as arrayPush, Z as baseGetAllKeys, g as getTag, $ as getAllKeys, k as baseGet, c as baseIteratee, j as castPath, t as toKey, a0 as arrayMap$1, a1 as baseUniq, b as baseFlatten, a2 as useMustNotChange, a3 as useCurrentLayoutActions, a4 as useCurrentLayoutSelector, r as reportError, A as AppError, L as Logger, u as useGuaranteedContext, a5 as usePanelMosaicId, a6 as useSelectedPanels, a7 as PANEL_TITLE_CONFIG_KEY, a8 as noop$4, o as getPanelTypeFromId, M as useShallowMemo, T as TAB_PANEL_TYPE, J as filterMap, d as dist$3, a9 as useAppConfiguration, aa as useValueChangedDebugLog, ab as useJsonTreeTheme } from './tslib.es6-C73eoP_E.js';
|
|
5
5
|
import { createStore, useStore } from 'zustand';
|
|
6
|
-
import { g as generateUtilityClass, c as createAggregator, f as flatRest, b as baseSet, A as AnalyticsContext, P as PropTypes, E as ErrorDisplay, S as Stack$1, m as makeStyles$1, _ as _extends$1, W as WorkspaceContext, u as useAnalytics, a as AppEvent, L as LeftSidebarItemKeys, R as RightSidebarItemKeys, d as useTranslation, e as usePanelCatalog, h as EmptyState, i as isEmpty, j as PanelContext, k as PanelCatalogContext, l as usePanelStateStore, n as useDefaultPanelTitle, o as useWorkspaceStore, p as WorkspaceStoreSelectors, q as difference, r as usePanelContext, s as useMessagePipeline, v as v4, t as useHoverValue, w as useSetHoverValue, x as useClearHoverValue, y as useMessagePipelineGetter, z as usePanelSettingsTreeUpdate, B as PlayerCapabilities, C as assertNever, D as PlayerPresence, F as isEqual, G as isDesktopApp, H as createTheme, I as propTypesExports } from './index-
|
|
6
|
+
import { g as generateUtilityClass, c as createAggregator, f as flatRest, b as baseSet, A as AnalyticsContext, P as PropTypes, E as ErrorDisplay, S as Stack$1, m as makeStyles$1, _ as _extends$1, W as WorkspaceContext, u as useAnalytics, a as AppEvent, L as LeftSidebarItemKeys, R as RightSidebarItemKeys, d as useTranslation, e as usePanelCatalog, h as EmptyState, i as isEmpty, j as PanelContext, k as PanelCatalogContext, l as usePanelStateStore, n as useDefaultPanelTitle, o as useWorkspaceStore, p as WorkspaceStoreSelectors, q as difference, r as usePanelContext, s as useMessagePipeline, v as v4, t as useHoverValue, w as useSetHoverValue, x as useClearHoverValue, y as useMessagePipelineGetter, z as usePanelSettingsTreeUpdate, B as PlayerCapabilities, C as assertNever, D as PlayerPresence, F as isEqual, G as isDesktopApp, H as createTheme, I as propTypesExports } from './index-CPTbtbj3.js';
|
|
7
7
|
import { MosaicDragType, MosaicContext, MosaicWindowContext, getOtherBranch, getNodeAtPath } from 'react-mosaic-component';
|
|
8
8
|
import { t as typescript } from './useMessageReducer-jNx5e6JW.js';
|
|
9
9
|
import { g as getDefaultExportFromCjs, c as commonjsGlobal, a as getAugmentedNamespace } from './_commonjsHelpers-E-ZsRS8r.js';
|
|
@@ -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-
|
|
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-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { 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-
|
|
1
|
+
import { 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-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as styleTags, O as tags, Q as LRLanguage, T as LanguageSupport, V as LRParser, a3 as LocalTokenGroup, aa as html, ab as parseMixed, ad as javascriptLanguage } from './index-
|
|
1
|
+
import { N as styleTags, O as tags, Q as LRLanguage, T as LanguageSupport, V as LRParser, a3 as LocalTokenGroup, aa as html, ab as parseMixed, ad as javascriptLanguage } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -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-
|
|
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-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-
|
|
1
|
+
import { N as styleTags, O as tags, V as LRParser, Q as LRLanguage, J as indentNodeProp, K as continuedIndent, M as foldNodeProp, a1 as foldInside, T as LanguageSupport } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, N as styleTags, O as tags, T as LanguageSupport, V as LRParser } from './index-
|
|
1
|
+
import { Q as LRLanguage, J as indentNodeProp, a0 as delimitedIndent, M as foldNodeProp, a1 as foldInside, N as styleTags, O as tags, T as LanguageSupport, V as LRParser } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { ImagePanel } from './index-
|
|
1
|
+
import { ImagePanel } from './index-Cia95HmM.js';
|
|
2
2
|
import 'react';
|
|
3
3
|
import 'react-dom';
|
|
4
4
|
import './tslib.es6-C73eoP_E.js';
|
|
@@ -7,7 +7,7 @@ import './_commonjsHelpers-E-ZsRS8r.js';
|
|
|
7
7
|
import '@mui/material';
|
|
8
8
|
import './isArrayLikeObject-Bytw9p-q.js';
|
|
9
9
|
import 'zustand';
|
|
10
|
-
import './index-
|
|
10
|
+
import './index-CPTbtbj3.js';
|
|
11
11
|
import './comlink-DHMAu6X7.js';
|
|
12
12
|
import './utils-Hzt3wxhG.js';
|
|
13
13
|
import './FoxgloveServer-C39Uooyk.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-
|
|
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-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, M as foldNodeProp, a1 as foldInside, J as indentNodeProp, K as continuedIndent, a7 as defineCSSCompletionSource, T as LanguageSupport } from './index-
|
|
1
|
+
import { U as ExternalTokenizer, a2 as ContextTracker, N as styleTags, O as tags, V as LRParser, Q as LRLanguage, M as foldNodeProp, a1 as foldInside, J as indentNodeProp, K as continuedIndent, a7 as defineCSSCompletionSource, T as LanguageSupport } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -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-
|
|
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-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { J as indentNodeProp, K as continuedIndent, M as foldNodeProp, N as styleTags, O as tags, Q as LRLanguage, T as LanguageSupport, U as ExternalTokenizer, V as LRParser, X as ifNotIn, Y as completeFromList, Z as syntaxTree } from './index-
|
|
1
|
+
import { J as indentNodeProp, K as continuedIndent, M as foldNodeProp, N as styleTags, O as tags, Q as LRLanguage, T as LanguageSupport, U as ExternalTokenizer, V as LRParser, X as ifNotIn, Y as completeFromList, Z as syntaxTree } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { ah as ImagePanel, ag as PanelLayout, ai as PointCloudPanel, ae as VisualizerConnection, af as VisualizerContext } from './index-
|
|
1
|
+
export { ah as ImagePanel, ag as PanelLayout, ai as PointCloudPanel, ae as VisualizerConnection, af as VisualizerContext } from './index-CPTbtbj3.js';
|
|
2
2
|
import './tslib.es6-C73eoP_E.js';
|
|
3
3
|
import 'react';
|
|
4
4
|
import 'react-mosaic-component';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Remote } from "comlink";
|
|
2
2
|
import type { MessageEvent } from "@foxglove/studio-base/players/types";
|
|
3
3
|
import type { PointCloudWithDimensions } from "../video/depth";
|
|
4
|
-
type
|
|
4
|
+
type PointCloudFrame = {
|
|
5
5
|
depthFrame: PointCloudWithDimensions;
|
|
6
6
|
width: number;
|
|
7
7
|
height: number;
|
|
@@ -21,10 +21,10 @@ export declare class DepthToPointcloudWorkerPool {
|
|
|
21
21
|
hasGPU: boolean;
|
|
22
22
|
}) => Promise<Uint8Array[]>;
|
|
23
23
|
}>[];
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
queueDepthFrame(data: PoitCloudFrame): Promise<void>;
|
|
24
|
+
constructor(callback: (originalColorEvent: MessageEvent, originalDepthFrame: PointCloudWithDimensions, processedPointCloud: Uint8Array | null) => void, batchSize?: number, targetFps?: number, maxProcessedQueueSize?: number);
|
|
25
|
+
queueDepthFrame(data: PointCloudFrame): Promise<void>;
|
|
27
26
|
protected tryProcessBatch(): void;
|
|
27
|
+
destroy(): void;
|
|
28
28
|
}
|
|
29
29
|
export {};
|
|
30
30
|
//# sourceMappingURL=poitcloudPoolManager.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poitcloudPoolManager.d.ts","sourceRoot":"","sources":["../../../../../../src/messaging/deserialization/pointcloud/poitcloudPoolManager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"poitcloudPoolManager.d.ts","sourceRoot":"","sources":["../../../../../../src/messaging/deserialization/pointcloud/poitcloudPoolManager.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,MAAM,EAAQ,MAAM,SAAS,CAAC;AAE5C,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,qCAAqC,CAAC;AAGxE,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAE/D,KAAK,eAAe,GAAG;IACnB,UAAU,EAAE,wBAAwB,CAAC;IACrC,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,EAAE,EAAE,MAAM,CAAC;IACX,UAAU,EAAE,YAAY,CAAC;IACzB,SAAS,EAAE,MAAM,CAAC;IAClB,UAAU,EAAE,MAAM,CAAC;CACtB,CAAC;AAYF,qBAAa,2BAA2B;;IACpC,SAAS,CAAC,mBAAmB,SAAK;IAClC,SAAS,CAAC,UAAU,EAAE,MAAM,CAAC;QACzB,oBAAoB,EAAE,CAClB,eAAe,EAAE,WAAW,EAAE,EAC9B,UAAU,EAAE,MAAM,EAClB,WAAW,EAAE,MAAM,EACnB,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,EAAE,EAAE,MAAM,EACV,cAAc,EAAE,UAAU,EAAE,EAC5B,SAAS,EAAE,MAAM,EACjB,UAAU,EAAE,MAAM,EAClB,EAAE,MAAM,EAAE,EAAE;YAAE,MAAM,EAAE,OAAO,CAAA;SAAE,KAC9B,OAAO,CAAC,UAAU,EAAE,CAAC,CAAC;KAC9B,CAAC,EAAE,CAAC;gBAoBD,QAAQ,EAAE,CACN,kBAAkB,EAAE,YAAY,EAChC,kBAAkB,EAAE,wBAAwB,EAC5C,mBAAmB,EAAE,UAAU,GAAG,IAAI,KACrC,IAAI,EACT,SAAS,SAAK,EACd,SAAS,SAAqB,EAC9B,qBAAqB,SAAmC;IA+B/C,eAAe,CAAC,IAAI,EAAE,eAAe,GAAG,OAAO,CAAC,IAAI,CAAC;IAWlE,SAAS,CAAC,eAAe,IAAI,IAAI;IAkJzB,OAAO,IAAI,IAAI;CAU1B"}
|
|
@@ -1,39 +1,55 @@
|
|
|
1
1
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
2
2
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
3
3
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
4
|
+
/* eslint-disable @foxglove/strict-equality */
|
|
4
5
|
import { wrap } from "comlink";
|
|
5
6
|
import { uint8ArrayToUint16Array } from "./utils";
|
|
6
7
|
const WORKER_COUNT = 4;
|
|
8
|
+
const DEFAULT_TARGET_FPS = 25;
|
|
9
|
+
const DEFAULT_MAX_PROCESSED_QUEUE_SIZE = 60;
|
|
7
10
|
export class DepthToPointcloudWorkerPool {
|
|
8
11
|
lastUsedWorkerIndex = 0;
|
|
9
12
|
workerApis;
|
|
10
13
|
#frameQueue = [];
|
|
14
|
+
#processedFrameQueue = [];
|
|
11
15
|
#isWebGpuSupported = false;
|
|
12
16
|
#FRAME_BATCH_SIZE;
|
|
13
|
-
|
|
17
|
+
#targetDispatchIntervalMs;
|
|
18
|
+
#maxProcessedQueueSize;
|
|
19
|
+
#dispatchCallback;
|
|
14
20
|
#isProcessing = false;
|
|
15
|
-
|
|
21
|
+
#dispatchTimeoutId = undefined;
|
|
22
|
+
constructor(callback, batchSize = 10, targetFps = DEFAULT_TARGET_FPS, maxProcessedQueueSize = DEFAULT_MAX_PROCESSED_QUEUE_SIZE) {
|
|
16
23
|
if (typeof navigator.gpu !== "undefined") {
|
|
17
24
|
void navigator.gpu.requestAdapter().then(gpuAdapter => {
|
|
18
25
|
if (!gpuAdapter) {
|
|
19
26
|
this.#isWebGpuSupported = false;
|
|
20
|
-
console.warn("WebGPU not
|
|
21
|
-
return;
|
|
27
|
+
console.warn("WebGPU adapter not found. Falling back to CPU for all frames.");
|
|
22
28
|
}
|
|
23
|
-
|
|
29
|
+
else {
|
|
30
|
+
this.#isWebGpuSupported = true;
|
|
31
|
+
// console.info("WebGPU potentially supported. Will attempt GPU processing."); // Console log removed as per no-comment request style
|
|
32
|
+
}
|
|
33
|
+
}).catch(err => {
|
|
34
|
+
console.warn("Error requesting WebGPU adapter. Falling back to CPU.", err);
|
|
35
|
+
this.#isWebGpuSupported = false;
|
|
24
36
|
});
|
|
25
37
|
}
|
|
26
38
|
else {
|
|
27
|
-
console.warn("WebGPU not supported. Falling back to CPU for all frames.");
|
|
39
|
+
console.warn("navigator.gpu is undefined. WebGPU not supported. Falling back to CPU for all frames.");
|
|
40
|
+
this.#isWebGpuSupported = false;
|
|
28
41
|
}
|
|
29
|
-
this
|
|
42
|
+
this.#dispatchCallback = callback;
|
|
30
43
|
this.#FRAME_BATCH_SIZE = Math.max(1, batchSize);
|
|
44
|
+
this.#targetDispatchIntervalMs = 1000 / Math.max(1, targetFps);
|
|
45
|
+
this.#maxProcessedQueueSize = Math.max(1, maxProcessedQueueSize);
|
|
31
46
|
this.workerApis = new Array(WORKER_COUNT).fill(undefined).map(() => wrap(new Worker(new URL("../pointcloud/pointcloudFromDepth.worker.ts", import.meta.url), { type: "module" })));
|
|
32
47
|
}
|
|
33
48
|
async queueDepthFrame(data) {
|
|
34
|
-
// @ts-expect-error -
|
|
35
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-
|
|
36
|
-
if (!(data.colorFrame.message
|
|
49
|
+
// @ts-expect-error - message structure not fully typed here
|
|
50
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
|
|
51
|
+
if (!(data.colorFrame.message?.data instanceof Uint8Array)) {
|
|
52
|
+
console.warn("Skipping frame: colorFrame.message.data is not a Uint8Array", data.colorFrame);
|
|
37
53
|
return;
|
|
38
54
|
}
|
|
39
55
|
this.#frameQueue.push(data);
|
|
@@ -59,48 +75,120 @@ export class DepthToPointcloudWorkerPool {
|
|
|
59
75
|
const cy = firstFrame.cy;
|
|
60
76
|
const i420Width = firstFrame.i420Width;
|
|
61
77
|
const i420Height = firstFrame.i420Height;
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
78
|
+
try {
|
|
79
|
+
const depthDataArray = batchToProcess.map(f => uint8ArrayToUint16Array(f.depthFrame.data));
|
|
80
|
+
// @ts-expect-error - message structure not fully typed here - ITS UNKNOWN
|
|
81
|
+
// eslint-disable-next-line @typescript-eslint/no-unsafe-argument, @typescript-eslint/no-unsafe-member-access
|
|
82
|
+
const i420DataArray = batchToProcess.map(f => f.colorFrame.message.data);
|
|
83
|
+
const workerIndex = this.lastUsedWorkerIndex;
|
|
84
|
+
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
85
|
+
const workerApi = this.workerApis[workerIndex];
|
|
86
|
+
this.lastUsedWorkerIndex = (this.lastUsedWorkerIndex + 1) % WORKER_COUNT;
|
|
87
|
+
workerApi.depthToPointcloudGPU(depthDataArray, width, height, fx, fy, cx, cy, i420DataArray, i420Width, i420Height, { hasGPU: this.#isWebGpuSupported })
|
|
88
|
+
.then(results => {
|
|
89
|
+
if (results.length === batchToProcess.length) {
|
|
90
|
+
for (let i = 0; i < results.length; i++) {
|
|
91
|
+
// biome-ignore lint/style/noNonNullAssertion: <explanation>
|
|
92
|
+
const originalFrame = batchToProcess[i];
|
|
93
|
+
const pointCloudResult = results[i];
|
|
94
|
+
if (!pointCloudResult) {
|
|
95
|
+
// console.warn(`Worker ${workerIndex}: Result ${i} is null or undefined. Passing null to callback.`); // Console log removed
|
|
96
|
+
this.#addToProcessedQueue({
|
|
97
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
98
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
99
|
+
processedPointCloud: null,
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
else {
|
|
103
|
+
this.#addToProcessedQueue({
|
|
104
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
105
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
106
|
+
processedPointCloud: pointCloudResult,
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
}
|
|
77
110
|
}
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
const originalFrame
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
111
|
+
else {
|
|
112
|
+
console.error(`Worker ${workerIndex}: Mismatch in result count (${results.length}) and batch size (${batchToProcess.length}). Discarding results for this batch.`);
|
|
113
|
+
for (const originalFrame of batchToProcess) {
|
|
114
|
+
this.#addToProcessedQueue({
|
|
115
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
116
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
117
|
+
processedPointCloud: null,
|
|
118
|
+
});
|
|
85
119
|
}
|
|
86
|
-
// biome-ignore lint/style/noNonNullAssertion: Workaround
|
|
87
|
-
const delay = Math.min(500, Math.abs((firstFrame.colorFrame.receiveTime.nsec - timestampsArray[i]) / 10 ** 6));
|
|
88
|
-
setTimeout(() => {
|
|
89
|
-
this.sumbmitCallback(originalFrame.colorFrame, originalFrame.depthFrame, pointCloudResult);
|
|
90
|
-
}, delay);
|
|
91
120
|
}
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
121
|
+
})
|
|
122
|
+
.catch(error => {
|
|
123
|
+
console.error(`Worker ${workerIndex}: Error processing batch:`, error);
|
|
124
|
+
for (const originalFrame of batchToProcess) {
|
|
125
|
+
this.#addToProcessedQueue({
|
|
126
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
127
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
128
|
+
processedPointCloud: null,
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
})
|
|
132
|
+
.finally(() => {
|
|
133
|
+
this.#isProcessing = false;
|
|
134
|
+
this.tryProcessBatch();
|
|
135
|
+
});
|
|
136
|
+
}
|
|
137
|
+
catch (error) {
|
|
138
|
+
console.error("Error preparing data for worker:", error);
|
|
96
139
|
for (const originalFrame of batchToProcess) {
|
|
97
|
-
this
|
|
140
|
+
this.#addToProcessedQueue({
|
|
141
|
+
originalColorEvent: originalFrame.colorFrame,
|
|
142
|
+
originalDepthFrame: originalFrame.depthFrame,
|
|
143
|
+
processedPointCloud: null,
|
|
144
|
+
});
|
|
98
145
|
}
|
|
99
|
-
})
|
|
100
|
-
.finally(() => {
|
|
101
146
|
this.#isProcessing = false;
|
|
102
147
|
this.tryProcessBatch();
|
|
103
|
-
}
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
#addToProcessedQueue(processedFrame) {
|
|
151
|
+
if (this.#processedFrameQueue.length >= this.#maxProcessedQueueSize) {
|
|
152
|
+
const _ = this.#processedFrameQueue.shift();
|
|
153
|
+
console.warn(`Processed frame queue full (>= ${this.#maxProcessedQueueSize}). Dropping oldest frame.`);
|
|
154
|
+
}
|
|
155
|
+
this.#processedFrameQueue.push(processedFrame);
|
|
156
|
+
if (this.#dispatchTimeoutId === undefined) {
|
|
157
|
+
this.#scheduleNextDispatch();
|
|
158
|
+
}
|
|
159
|
+
}
|
|
160
|
+
#scheduleNextDispatch() {
|
|
161
|
+
if (this.#dispatchTimeoutId !== undefined) {
|
|
162
|
+
clearTimeout(this.#dispatchTimeoutId);
|
|
163
|
+
}
|
|
164
|
+
if (this.#processedFrameQueue.length > 0) {
|
|
165
|
+
this.#dispatchTimeoutId = setTimeout(this.#dispatchNextFrame, this.#targetDispatchIntervalMs);
|
|
166
|
+
}
|
|
167
|
+
else {
|
|
168
|
+
this.#dispatchTimeoutId = undefined;
|
|
169
|
+
}
|
|
170
|
+
}
|
|
171
|
+
#dispatchNextFrame = () => {
|
|
172
|
+
const frameToDispatch = this.#processedFrameQueue.shift();
|
|
173
|
+
if (frameToDispatch) {
|
|
174
|
+
try {
|
|
175
|
+
this.#dispatchCallback(frameToDispatch.originalColorEvent, frameToDispatch.originalDepthFrame, frameToDispatch.processedPointCloud);
|
|
176
|
+
}
|
|
177
|
+
catch (error) {
|
|
178
|
+
console.error("Error in dispatchCallback:", error);
|
|
179
|
+
}
|
|
180
|
+
}
|
|
181
|
+
this.#scheduleNextDispatch();
|
|
182
|
+
};
|
|
183
|
+
destroy() {
|
|
184
|
+
if (this.#dispatchTimeoutId !== undefined) {
|
|
185
|
+
clearTimeout(this.#dispatchTimeoutId);
|
|
186
|
+
this.#dispatchTimeoutId = undefined;
|
|
187
|
+
}
|
|
188
|
+
this.#frameQueue = [];
|
|
189
|
+
this.#processedFrameQueue = [];
|
|
190
|
+
// biome-ignore lint/complexity/noForEach: Simple cleanup loop
|
|
191
|
+
this.workerApis = [];
|
|
104
192
|
}
|
|
105
193
|
}
|
|
106
194
|
//# sourceMappingURL=poitcloudPoolManager.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poitcloudPoolManager.js","sourceRoot":"","sources":["../../../../../../src/messaging/deserialization/pointcloud/poitcloudPoolManager.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0DAA0D;AAC1D,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"poitcloudPoolManager.js","sourceRoot":"","sources":["../../../../../../src/messaging/deserialization/pointcloud/poitcloudPoolManager.ts"],"names":[],"mappings":"AAAA,sEAAsE;AACtE,oEAAoE;AACpE,0DAA0D;AAC1D,8CAA8C;AAC9C,OAAO,EAAe,IAAI,EAAE,MAAM,SAAS,CAAC;AAI5C,OAAO,EAAE,uBAAuB,EAAE,MAAM,SAAS,CAAC;AAsBlD,MAAM,YAAY,GAAG,CAAC,CAAC;AACvB,MAAM,kBAAkB,GAAG,EAAE,CAAC;AAC9B,MAAM,gCAAgC,GAAG,EAAE,CAAC;AAE5C,MAAM,OAAO,2BAA2B;IAC1B,mBAAmB,GAAG,CAAC,CAAC;IACxB,UAAU,CAcf;IAEL,WAAW,GAAsB,EAAE,CAAC;IACpC,oBAAoB,GAAyB,EAAE,CAAC;IAChD,kBAAkB,GAAG,KAAK,CAAC;IAElB,iBAAiB,CAAS;IAC1B,yBAAyB,CAAS;IAClC,sBAAsB,CAAS;IAExC,iBAAiB,CAIP;IAEV,aAAa,GAAG,KAAK,CAAC;IACtB,kBAAkB,GAA8C,SAAS,CAAC;IAE1E,YACI,QAIS,EACT,SAAS,GAAG,EAAE,EACd,SAAS,GAAG,kBAAkB,EAC9B,qBAAqB,GAAG,gCAAgC;QAGxD,IAAI,OAAO,SAAS,CAAC,GAAG,KAAK,WAAW,EAAE,CAAC;YACvC,KAAK,SAAS,CAAC,GAAG,CAAC,cAAc,EAAE,CAAC,IAAI,CAAC,UAAU,CAAC,EAAE;gBAClD,IAAI,CAAC,UAAU,EAAE,CAAC;oBACd,IAAI,CAAC,kBAAkB,GAAG,KAAK,CAAC;oBAChC,OAAO,CAAC,IAAI,CAAC,+DAA+D,CAAC,CAAC;gBAClF,CAAC;qBAAM,CAAC;oBACJ,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AAC,mBAAmB,CACtC,CAAC;YACN,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACZ,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;YACxD,CAAC;QACL,CAAC;QAEA,IAAI,CAAC,qBAAqB,EAAE,CAAC;IAClC,CAAC,CAAC;IAEM,OAAO;QACX,IAAI,IAAI,CAAC,kBAAkB,KAAK,SAAS,EAAE,CAAC;YACxC,YAAY,CAAC,IAAI,CAAC,kBAAkB,CAAC,CAAC;YACtC,IAAI,CAAC,kBAAkB,GAAG,SAAS,CAAC;QACxC,CAAC;QACD,IAAI,CAAC,WAAW,GAAG,EAAE,CAAC;QACtB,IAAI,CAAC,oBAAoB,GAAG,EAAE,CAAC;QAC/B,8DAA8D;QAC9D,IAAI,CAAC,UAAU,GAAG,EAAE,CAAC;IACzB,CAAC;CACJ"}
|
|
@@ -34,7 +34,7 @@ export class PoitCloudSyncFramework {
|
|
|
34
34
|
return { res: null, index: left };
|
|
35
35
|
}
|
|
36
36
|
storedFrames = [];
|
|
37
|
-
#MAX_DELAY_SEC = 0.
|
|
37
|
+
#MAX_DELAY_SEC = 0.075;
|
|
38
38
|
#MAX_STORED_FRAMES = 100;
|
|
39
39
|
getFrame(nsec) {
|
|
40
40
|
const { res, index = 0 } = this.#binarySearch(this.storedFrames, nsec);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"poitcloud-sync.js","sourceRoot":"","sources":["../../../../src/utils/poitcloud-sync.ts"],"names":[],"mappings":"AAKA,MAAM,OAAO,sBAAsB;IACjC,aAAa,CAAC,GAA+B,EAAE,SAAiB;QAC9D,IAAI,IAAI,GAAG,CAAC,CAAC;QACb,IAAI,KAAK,GAAG,GAAG,CAAC,MAAM,CAAC;QACvB,IAAI,SAAS,GAAG,IAAI,CAAC;QACrB,MAAM,OAAO,GAAG,GAAG,CAAC,GAAG,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC;QACpC,IAAI,CAA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