@luxonis/visualizer-protobuf 2.12.0 → 2.14.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/WorkerImageDecoder.worker-DCoSYoLL.js +31 -0
- package/dist/{decodeImage-BBqnjJjE.js → decodeImage-NYPkamnK.js} +29 -363
- package/dist/{index-Bm-sfjxA.js → index-BHzFgL5N.js} +1 -1
- package/dist/{index-DBIBZoxL.js → index-BJofTpil.js} +1 -1
- package/dist/{index-BQ-DVAKf.js → index-BPWE58mB.js} +85 -56
- package/dist/{index-DlZBtd34.js → index-BTNGGXoa.js} +1 -1
- package/dist/{index-BPvLkg91.js → index-BwoyZPjj.js} +1 -1
- package/dist/{index-Wtqlsb8j.js → index-C1eH0RCy.js} +1 -1
- package/dist/{index-CnJXVxDI.js → index-CIfIw1LQ.js} +1 -1
- package/dist/{index-DeuAC1JS.js → index-Cq7so9Q9.js} +1 -1
- package/dist/{index-qgG8SIsl.js → index-D7jNrXVP.js} +1 -1
- package/dist/{index-Daz5hiMP.js → index-D8jKQuGu.js} +388 -73
- package/dist/{index-CzaJSWor.js → index-D9d5kqGf.js} +1 -1
- package/dist/{index-BND59L-_.js → index-DAXpEznJ.js} +3 -3
- package/dist/{index-DXqNhUgR.js → index-DCh-Eobo.js} +1 -1
- package/dist/{index-DZWFfAzL.js → index-DI5QHg2x.js} +1 -1
- package/dist/{index-WQ5HqEqM.js → index-DM9oCkXH.js} +1 -1
- package/dist/{index-DujAeBia.js → index-DY6zQP_F.js} +1 -1
- package/dist/{index-IH42B4Mg.js → index-Di_-JfGf.js} +1 -1
- package/dist/{index-BNgQTecN.js → index-Zivk6fee.js} +1 -1
- package/dist/{index-DQBNcZG9.js → index-d8vRrHr4.js} +1 -1
- package/dist/index.js +1 -1
- package/dist/lib/src/components/PanelToolbar.d.ts.map +1 -1
- package/dist/lib/src/components/PanelToolbar.js +1 -1
- package/dist/lib/src/components/PanelToolbar.js.map +1 -1
- package/dist/lib/src/connection/foxglove-connection.d.ts +1 -0
- package/dist/lib/src/connection/foxglove-connection.d.ts.map +1 -1
- package/dist/lib/src/connection/foxglove-connection.js +15 -0
- package/dist/lib/src/connection/foxglove-connection.js.map +1 -1
- package/dist/lib/src/connection/webrtc/bridge.d.ts +1 -1
- package/dist/lib/src/connection/webrtc/bridge.d.ts.map +1 -1
- package/dist/lib/src/connection/webrtc/bridge.js +1 -1
- package/dist/lib/src/connection/webrtc/bridge.js.map +1 -1
- package/dist/lib/src/connection/webrtc/comms-proxy.d.ts.map +1 -1
- package/dist/lib/src/connection/webrtc/comms-proxy.js +4 -1
- package/dist/lib/src/connection/webrtc/comms-proxy.js.map +1 -1
- package/dist/lib/src/messaging/deserialization/pointcloud/utils.d.ts +19 -0
- package/dist/lib/src/messaging/deserialization/pointcloud/utils.d.ts.map +1 -0
- package/dist/lib/src/messaging/deserialization/pointcloud/utils.js +97 -0
- package/dist/lib/src/messaging/deserialization/pointcloud/utils.js.map +1 -0
- package/dist/lib/src/messaging/deserialization/video/depth.d.ts +6 -1
- package/dist/lib/src/messaging/deserialization/video/depth.d.ts.map +1 -1
- package/dist/lib/src/messaging/deserialization/video/depth.js +185 -7
- package/dist/lib/src/messaging/deserialization/video/depth.js.map +1 -1
- package/dist/lib/src/messaging/deserialization.js +1 -1
- package/dist/lib/src/messaging/deserialization.js.map +1 -1
- package/dist/lib/src/messaging/message-handler.d.ts.map +1 -1
- package/dist/lib/src/messaging/message-handler.js.map +1 -1
- package/dist/lib/src/panels/PointCloudPanel.js +2 -2
- package/dist/lib/src/panels/PointCloudPanel.js.map +1 -1
- package/dist/lib/src/protobuf.generated/IMUData.d.ts +122 -0
- package/dist/lib/src/protobuf.generated/IMUData.d.ts.map +1 -0
- package/dist/lib/src/protobuf.generated/IMUData.js +691 -0
- package/dist/lib/src/protobuf.generated/IMUData.js.map +1 -0
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.d.ts +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.js +6 -7
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/Renderer.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js +2 -3
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/ThreeDeeRender.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/ImageMode.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/ImageMode/ImageMode.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/ImageRenderable.d.ts +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/ImageRenderable.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/ImageRenderable.js +8 -3
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/ImageRenderable.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.d.ts +10 -2
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.js +69 -10
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.js.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.d.ts +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.d.ts.map +1 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.js +29 -21
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/decodeImage.js.map +1 -1
- package/package.json +4 -1
- package/dist/WorkerImageDecoder.worker-DjK2q36W.js +0 -18
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.worker.d.ts +0 -9
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.worker.d.ts.map +0 -1
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.worker.js +0 -15
- package/dist/packages/studio-base/src/panels/ThreeDeeRender/renderables/Images/WorkerImageDecoder.worker.js.map +0 -1
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { d as decodeRawImage } from './decodeImage-NYPkamnK.js';
|
|
2
|
+
import './i18next-C5Qe4-E1.js';
|
|
3
|
+
|
|
4
|
+
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
5
|
+
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
6
|
+
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
7
|
+
|
|
8
|
+
self.onmessage = async event => {
|
|
9
|
+
try {
|
|
10
|
+
const {
|
|
11
|
+
image,
|
|
12
|
+
options
|
|
13
|
+
} = event.data;
|
|
14
|
+
const buffer = new Uint8ClampedArray(image.width * image.height * 4);
|
|
15
|
+
|
|
16
|
+
// Decode image into the provided buffer
|
|
17
|
+
await decodeRawImage(image, options, buffer);
|
|
18
|
+
|
|
19
|
+
// Clear image data for earlier Garbage Collection
|
|
20
|
+
image.data.fill(0);
|
|
21
|
+
|
|
22
|
+
// Transfer the buffer back
|
|
23
|
+
self.postMessage({
|
|
24
|
+
result: buffer
|
|
25
|
+
}, [buffer.buffer]);
|
|
26
|
+
} catch (error) {
|
|
27
|
+
self.postMessage({
|
|
28
|
+
error: error instanceof Error ? error.message : "Unknown error occurred"
|
|
29
|
+
});
|
|
30
|
+
}
|
|
31
|
+
};
|
|
@@ -1,348 +1,5 @@
|
|
|
1
1
|
import { B as tinycolor, Q as t, C as merge } from './i18next-C5Qe4-E1.js';
|
|
2
2
|
|
|
3
|
-
/**
|
|
4
|
-
* @license
|
|
5
|
-
* Copyright 2019 Google LLC
|
|
6
|
-
* SPDX-License-Identifier: Apache-2.0
|
|
7
|
-
*/
|
|
8
|
-
const proxyMarker = Symbol("Comlink.proxy");
|
|
9
|
-
const createEndpoint = Symbol("Comlink.endpoint");
|
|
10
|
-
const releaseProxy = Symbol("Comlink.releaseProxy");
|
|
11
|
-
const finalizer = Symbol("Comlink.finalizer");
|
|
12
|
-
const throwMarker = Symbol("Comlink.thrown");
|
|
13
|
-
const isObject = (val) => (typeof val === "object" && val !== null) || typeof val === "function";
|
|
14
|
-
/**
|
|
15
|
-
* Internal transfer handle to handle objects marked to proxy.
|
|
16
|
-
*/
|
|
17
|
-
const proxyTransferHandler = {
|
|
18
|
-
canHandle: (val) => isObject(val) && val[proxyMarker],
|
|
19
|
-
serialize(obj) {
|
|
20
|
-
const { port1, port2 } = new MessageChannel();
|
|
21
|
-
expose(obj, port1);
|
|
22
|
-
return [port2, [port2]];
|
|
23
|
-
},
|
|
24
|
-
deserialize(port) {
|
|
25
|
-
port.start();
|
|
26
|
-
return wrap(port);
|
|
27
|
-
},
|
|
28
|
-
};
|
|
29
|
-
/**
|
|
30
|
-
* Internal transfer handler to handle thrown exceptions.
|
|
31
|
-
*/
|
|
32
|
-
const throwTransferHandler = {
|
|
33
|
-
canHandle: (value) => isObject(value) && throwMarker in value,
|
|
34
|
-
serialize({ value }) {
|
|
35
|
-
let serialized;
|
|
36
|
-
if (value instanceof Error) {
|
|
37
|
-
serialized = {
|
|
38
|
-
isError: true,
|
|
39
|
-
value: {
|
|
40
|
-
message: value.message,
|
|
41
|
-
name: value.name,
|
|
42
|
-
stack: value.stack,
|
|
43
|
-
},
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
else {
|
|
47
|
-
serialized = { isError: false, value };
|
|
48
|
-
}
|
|
49
|
-
return [serialized, []];
|
|
50
|
-
},
|
|
51
|
-
deserialize(serialized) {
|
|
52
|
-
if (serialized.isError) {
|
|
53
|
-
throw Object.assign(new Error(serialized.value.message), serialized.value);
|
|
54
|
-
}
|
|
55
|
-
throw serialized.value;
|
|
56
|
-
},
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Allows customizing the serialization of certain values.
|
|
60
|
-
*/
|
|
61
|
-
const transferHandlers = new Map([
|
|
62
|
-
["proxy", proxyTransferHandler],
|
|
63
|
-
["throw", throwTransferHandler],
|
|
64
|
-
]);
|
|
65
|
-
function isAllowedOrigin(allowedOrigins, origin) {
|
|
66
|
-
for (const allowedOrigin of allowedOrigins) {
|
|
67
|
-
if (origin === allowedOrigin || allowedOrigin === "*") {
|
|
68
|
-
return true;
|
|
69
|
-
}
|
|
70
|
-
if (allowedOrigin instanceof RegExp && allowedOrigin.test(origin)) {
|
|
71
|
-
return true;
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
return false;
|
|
75
|
-
}
|
|
76
|
-
function expose(obj, ep = globalThis, allowedOrigins = ["*"]) {
|
|
77
|
-
ep.addEventListener("message", function callback(ev) {
|
|
78
|
-
if (!ev || !ev.data) {
|
|
79
|
-
return;
|
|
80
|
-
}
|
|
81
|
-
if (!isAllowedOrigin(allowedOrigins, ev.origin)) {
|
|
82
|
-
console.warn(`Invalid origin '${ev.origin}' for comlink proxy`);
|
|
83
|
-
return;
|
|
84
|
-
}
|
|
85
|
-
const { id, type, path } = Object.assign({ path: [] }, ev.data);
|
|
86
|
-
const argumentList = (ev.data.argumentList || []).map(fromWireValue);
|
|
87
|
-
let returnValue;
|
|
88
|
-
try {
|
|
89
|
-
const parent = path.slice(0, -1).reduce((obj, prop) => obj[prop], obj);
|
|
90
|
-
const rawValue = path.reduce((obj, prop) => obj[prop], obj);
|
|
91
|
-
switch (type) {
|
|
92
|
-
case "GET" /* MessageType.GET */:
|
|
93
|
-
{
|
|
94
|
-
returnValue = rawValue;
|
|
95
|
-
}
|
|
96
|
-
break;
|
|
97
|
-
case "SET" /* MessageType.SET */:
|
|
98
|
-
{
|
|
99
|
-
parent[path.slice(-1)[0]] = fromWireValue(ev.data.value);
|
|
100
|
-
returnValue = true;
|
|
101
|
-
}
|
|
102
|
-
break;
|
|
103
|
-
case "APPLY" /* MessageType.APPLY */:
|
|
104
|
-
{
|
|
105
|
-
returnValue = rawValue.apply(parent, argumentList);
|
|
106
|
-
}
|
|
107
|
-
break;
|
|
108
|
-
case "CONSTRUCT" /* MessageType.CONSTRUCT */:
|
|
109
|
-
{
|
|
110
|
-
const value = new rawValue(...argumentList);
|
|
111
|
-
returnValue = proxy(value);
|
|
112
|
-
}
|
|
113
|
-
break;
|
|
114
|
-
case "ENDPOINT" /* MessageType.ENDPOINT */:
|
|
115
|
-
{
|
|
116
|
-
const { port1, port2 } = new MessageChannel();
|
|
117
|
-
expose(obj, port2);
|
|
118
|
-
returnValue = transfer(port1, [port1]);
|
|
119
|
-
}
|
|
120
|
-
break;
|
|
121
|
-
case "RELEASE" /* MessageType.RELEASE */:
|
|
122
|
-
{
|
|
123
|
-
returnValue = undefined;
|
|
124
|
-
}
|
|
125
|
-
break;
|
|
126
|
-
default:
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
catch (value) {
|
|
131
|
-
returnValue = { value, [throwMarker]: 0 };
|
|
132
|
-
}
|
|
133
|
-
Promise.resolve(returnValue)
|
|
134
|
-
.catch((value) => {
|
|
135
|
-
return { value, [throwMarker]: 0 };
|
|
136
|
-
})
|
|
137
|
-
.then((returnValue) => {
|
|
138
|
-
const [wireValue, transferables] = toWireValue(returnValue);
|
|
139
|
-
ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);
|
|
140
|
-
if (type === "RELEASE" /* MessageType.RELEASE */) {
|
|
141
|
-
// detach and deactive after sending release response above.
|
|
142
|
-
ep.removeEventListener("message", callback);
|
|
143
|
-
closeEndPoint(ep);
|
|
144
|
-
if (finalizer in obj && typeof obj[finalizer] === "function") {
|
|
145
|
-
obj[finalizer]();
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
})
|
|
149
|
-
.catch((error) => {
|
|
150
|
-
// Send Serialization Error To Caller
|
|
151
|
-
const [wireValue, transferables] = toWireValue({
|
|
152
|
-
value: new TypeError("Unserializable return value"),
|
|
153
|
-
[throwMarker]: 0,
|
|
154
|
-
});
|
|
155
|
-
ep.postMessage(Object.assign(Object.assign({}, wireValue), { id }), transferables);
|
|
156
|
-
});
|
|
157
|
-
});
|
|
158
|
-
if (ep.start) {
|
|
159
|
-
ep.start();
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
|
-
function isMessagePort(endpoint) {
|
|
163
|
-
return endpoint.constructor.name === "MessagePort";
|
|
164
|
-
}
|
|
165
|
-
function closeEndPoint(endpoint) {
|
|
166
|
-
if (isMessagePort(endpoint))
|
|
167
|
-
endpoint.close();
|
|
168
|
-
}
|
|
169
|
-
function wrap(ep, target) {
|
|
170
|
-
const pendingListeners = new Map();
|
|
171
|
-
ep.addEventListener("message", function handleMessage(ev) {
|
|
172
|
-
const { data } = ev;
|
|
173
|
-
if (!data || !data.id) {
|
|
174
|
-
return;
|
|
175
|
-
}
|
|
176
|
-
const resolver = pendingListeners.get(data.id);
|
|
177
|
-
if (!resolver) {
|
|
178
|
-
return;
|
|
179
|
-
}
|
|
180
|
-
try {
|
|
181
|
-
resolver(data);
|
|
182
|
-
}
|
|
183
|
-
finally {
|
|
184
|
-
pendingListeners.delete(data.id);
|
|
185
|
-
}
|
|
186
|
-
});
|
|
187
|
-
return createProxy(ep, pendingListeners, [], target);
|
|
188
|
-
}
|
|
189
|
-
function throwIfProxyReleased(isReleased) {
|
|
190
|
-
if (isReleased) {
|
|
191
|
-
throw new Error("Proxy has been released and is not useable");
|
|
192
|
-
}
|
|
193
|
-
}
|
|
194
|
-
function releaseEndpoint(ep) {
|
|
195
|
-
return requestResponseMessage(ep, new Map(), {
|
|
196
|
-
type: "RELEASE" /* MessageType.RELEASE */,
|
|
197
|
-
}).then(() => {
|
|
198
|
-
closeEndPoint(ep);
|
|
199
|
-
});
|
|
200
|
-
}
|
|
201
|
-
const proxyCounter = new WeakMap();
|
|
202
|
-
const proxyFinalizers = "FinalizationRegistry" in globalThis &&
|
|
203
|
-
new FinalizationRegistry((ep) => {
|
|
204
|
-
const newCount = (proxyCounter.get(ep) || 0) - 1;
|
|
205
|
-
proxyCounter.set(ep, newCount);
|
|
206
|
-
if (newCount === 0) {
|
|
207
|
-
releaseEndpoint(ep);
|
|
208
|
-
}
|
|
209
|
-
});
|
|
210
|
-
function registerProxy(proxy, ep) {
|
|
211
|
-
const newCount = (proxyCounter.get(ep) || 0) + 1;
|
|
212
|
-
proxyCounter.set(ep, newCount);
|
|
213
|
-
if (proxyFinalizers) {
|
|
214
|
-
proxyFinalizers.register(proxy, ep, proxy);
|
|
215
|
-
}
|
|
216
|
-
}
|
|
217
|
-
function unregisterProxy(proxy) {
|
|
218
|
-
if (proxyFinalizers) {
|
|
219
|
-
proxyFinalizers.unregister(proxy);
|
|
220
|
-
}
|
|
221
|
-
}
|
|
222
|
-
function createProxy(ep, pendingListeners, path = [], target = function () { }) {
|
|
223
|
-
let isProxyReleased = false;
|
|
224
|
-
const proxy = new Proxy(target, {
|
|
225
|
-
get(_target, prop) {
|
|
226
|
-
throwIfProxyReleased(isProxyReleased);
|
|
227
|
-
if (prop === releaseProxy) {
|
|
228
|
-
return () => {
|
|
229
|
-
unregisterProxy(proxy);
|
|
230
|
-
releaseEndpoint(ep);
|
|
231
|
-
pendingListeners.clear();
|
|
232
|
-
isProxyReleased = true;
|
|
233
|
-
};
|
|
234
|
-
}
|
|
235
|
-
if (prop === "then") {
|
|
236
|
-
if (path.length === 0) {
|
|
237
|
-
return { then: () => proxy };
|
|
238
|
-
}
|
|
239
|
-
const r = requestResponseMessage(ep, pendingListeners, {
|
|
240
|
-
type: "GET" /* MessageType.GET */,
|
|
241
|
-
path: path.map((p) => p.toString()),
|
|
242
|
-
}).then(fromWireValue);
|
|
243
|
-
return r.then.bind(r);
|
|
244
|
-
}
|
|
245
|
-
return createProxy(ep, pendingListeners, [...path, prop]);
|
|
246
|
-
},
|
|
247
|
-
set(_target, prop, rawValue) {
|
|
248
|
-
throwIfProxyReleased(isProxyReleased);
|
|
249
|
-
// FIXME: ES6 Proxy Handler `set` methods are supposed to return a
|
|
250
|
-
// boolean. To show good will, we return true asynchronously ¯\_(ツ)_/¯
|
|
251
|
-
const [value, transferables] = toWireValue(rawValue);
|
|
252
|
-
return requestResponseMessage(ep, pendingListeners, {
|
|
253
|
-
type: "SET" /* MessageType.SET */,
|
|
254
|
-
path: [...path, prop].map((p) => p.toString()),
|
|
255
|
-
value,
|
|
256
|
-
}, transferables).then(fromWireValue);
|
|
257
|
-
},
|
|
258
|
-
apply(_target, _thisArg, rawArgumentList) {
|
|
259
|
-
throwIfProxyReleased(isProxyReleased);
|
|
260
|
-
const last = path[path.length - 1];
|
|
261
|
-
if (last === createEndpoint) {
|
|
262
|
-
return requestResponseMessage(ep, pendingListeners, {
|
|
263
|
-
type: "ENDPOINT" /* MessageType.ENDPOINT */,
|
|
264
|
-
}).then(fromWireValue);
|
|
265
|
-
}
|
|
266
|
-
// We just pretend that `bind()` didn’t happen.
|
|
267
|
-
if (last === "bind") {
|
|
268
|
-
return createProxy(ep, pendingListeners, path.slice(0, -1));
|
|
269
|
-
}
|
|
270
|
-
const [argumentList, transferables] = processArguments(rawArgumentList);
|
|
271
|
-
return requestResponseMessage(ep, pendingListeners, {
|
|
272
|
-
type: "APPLY" /* MessageType.APPLY */,
|
|
273
|
-
path: path.map((p) => p.toString()),
|
|
274
|
-
argumentList,
|
|
275
|
-
}, transferables).then(fromWireValue);
|
|
276
|
-
},
|
|
277
|
-
construct(_target, rawArgumentList) {
|
|
278
|
-
throwIfProxyReleased(isProxyReleased);
|
|
279
|
-
const [argumentList, transferables] = processArguments(rawArgumentList);
|
|
280
|
-
return requestResponseMessage(ep, pendingListeners, {
|
|
281
|
-
type: "CONSTRUCT" /* MessageType.CONSTRUCT */,
|
|
282
|
-
path: path.map((p) => p.toString()),
|
|
283
|
-
argumentList,
|
|
284
|
-
}, transferables).then(fromWireValue);
|
|
285
|
-
},
|
|
286
|
-
});
|
|
287
|
-
registerProxy(proxy, ep);
|
|
288
|
-
return proxy;
|
|
289
|
-
}
|
|
290
|
-
function myFlat(arr) {
|
|
291
|
-
return Array.prototype.concat.apply([], arr);
|
|
292
|
-
}
|
|
293
|
-
function processArguments(argumentList) {
|
|
294
|
-
const processed = argumentList.map(toWireValue);
|
|
295
|
-
return [processed.map((v) => v[0]), myFlat(processed.map((v) => v[1]))];
|
|
296
|
-
}
|
|
297
|
-
const transferCache = new WeakMap();
|
|
298
|
-
function transfer(obj, transfers) {
|
|
299
|
-
transferCache.set(obj, transfers);
|
|
300
|
-
return obj;
|
|
301
|
-
}
|
|
302
|
-
function proxy(obj) {
|
|
303
|
-
return Object.assign(obj, { [proxyMarker]: true });
|
|
304
|
-
}
|
|
305
|
-
function toWireValue(value) {
|
|
306
|
-
for (const [name, handler] of transferHandlers) {
|
|
307
|
-
if (handler.canHandle(value)) {
|
|
308
|
-
const [serializedValue, transferables] = handler.serialize(value);
|
|
309
|
-
return [
|
|
310
|
-
{
|
|
311
|
-
type: "HANDLER" /* WireValueType.HANDLER */,
|
|
312
|
-
name,
|
|
313
|
-
value: serializedValue,
|
|
314
|
-
},
|
|
315
|
-
transferables,
|
|
316
|
-
];
|
|
317
|
-
}
|
|
318
|
-
}
|
|
319
|
-
return [
|
|
320
|
-
{
|
|
321
|
-
type: "RAW" /* WireValueType.RAW */,
|
|
322
|
-
value,
|
|
323
|
-
},
|
|
324
|
-
transferCache.get(value) || [],
|
|
325
|
-
];
|
|
326
|
-
}
|
|
327
|
-
function fromWireValue(value) {
|
|
328
|
-
switch (value.type) {
|
|
329
|
-
case "HANDLER" /* WireValueType.HANDLER */:
|
|
330
|
-
return transferHandlers.get(value.name).deserialize(value.value);
|
|
331
|
-
case "RAW" /* WireValueType.RAW */:
|
|
332
|
-
return value.value;
|
|
333
|
-
}
|
|
334
|
-
}
|
|
335
|
-
function requestResponseMessage(ep, pendingListeners, msg, transfers) {
|
|
336
|
-
return new Promise((resolve) => {
|
|
337
|
-
const id = Math.trunc(Math.random() * Number.MAX_SAFE_INTEGER).toString();
|
|
338
|
-
pendingListeners.set(id, resolve);
|
|
339
|
-
if (ep.start) {
|
|
340
|
-
ep.start();
|
|
341
|
-
}
|
|
342
|
-
ep.postMessage(Object.assign({ id }, msg), transfers);
|
|
343
|
-
});
|
|
344
|
-
}
|
|
345
|
-
|
|
346
3
|
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
347
4
|
// License, v2.0. If a copy of the MPL was not distributed with this
|
|
348
5
|
// file, You can obtain one at http://mozilla.org/MPL/2.0/
|
|
@@ -41795,7 +41452,7 @@ const MIN_MAX_16_BIT = {
|
|
|
41795
41452
|
* See also:
|
|
41796
41453
|
* https://github.com/ros2/common_interfaces/blob/366eea24ffce6c87f8860cbcd27f4863f46ad822/sensor_msgs/include/sensor_msgs/image_encodings.hpp
|
|
41797
41454
|
*/
|
|
41798
|
-
function decodeRawImage(image, options, output) {
|
|
41455
|
+
async function decodeRawImage(image, options, output) {
|
|
41799
41456
|
const {
|
|
41800
41457
|
encoding,
|
|
41801
41458
|
width,
|
|
@@ -41807,60 +41464,69 @@ function decodeRawImage(image, options, output) {
|
|
|
41807
41464
|
planeStride
|
|
41808
41465
|
} = image;
|
|
41809
41466
|
const is_bigendian = "is_bigendian" in image ? image.is_bigendian : false;
|
|
41810
|
-
const rawData = image.data;
|
|
41811
41467
|
switch (encoding) {
|
|
41812
41468
|
case "yuv422":
|
|
41813
41469
|
case "uyvy":
|
|
41814
|
-
decodeUYVY(
|
|
41470
|
+
decodeUYVY(image.data, width, height, step, output);
|
|
41815
41471
|
break;
|
|
41816
41472
|
case "nv12":
|
|
41817
|
-
decodeNV12(
|
|
41473
|
+
decodeNV12(image.data, width, height, output, stride, planeStride);
|
|
41818
41474
|
break;
|
|
41819
41475
|
case "yuv422_yuy2":
|
|
41820
41476
|
case "yuyv":
|
|
41821
|
-
decodeYUYV(
|
|
41477
|
+
decodeYUYV(image.data, width, height, step, output);
|
|
41822
41478
|
break;
|
|
41823
41479
|
case "rgb8":
|
|
41824
|
-
decodeRGB8(
|
|
41480
|
+
decodeRGB8(image.data, width, height, step, output);
|
|
41825
41481
|
break;
|
|
41826
41482
|
case "rgb8p":
|
|
41827
|
-
decodeRGB8p(
|
|
41483
|
+
decodeRGB8p(image.data, width, height, step, output);
|
|
41828
41484
|
break;
|
|
41829
41485
|
case "rgba8":
|
|
41830
|
-
decodeRGBA8(
|
|
41486
|
+
decodeRGBA8(image.data, width, height, step, output);
|
|
41831
41487
|
break;
|
|
41832
41488
|
case "bgra8":
|
|
41833
|
-
decodeBGRA8(
|
|
41489
|
+
decodeBGRA8(image.data, width, height, step, output);
|
|
41834
41490
|
break;
|
|
41835
41491
|
case "bgr8":
|
|
41836
41492
|
case "bgr8p":
|
|
41837
41493
|
case "8UC3":
|
|
41838
|
-
decodeBGR8p(
|
|
41494
|
+
decodeBGR8p(image.data, width, height, step, output);
|
|
41839
41495
|
break;
|
|
41840
41496
|
case "bgr8i":
|
|
41841
|
-
decodeBGR8i(
|
|
41497
|
+
decodeBGR8i(image.data, width, height, step, output);
|
|
41842
41498
|
break;
|
|
41843
41499
|
case "32FC1":
|
|
41844
|
-
decodeFloat1c(
|
|
41500
|
+
decodeFloat1c(image.data, width, height, step, is_bigendian, output);
|
|
41845
41501
|
break;
|
|
41846
41502
|
case "I420":
|
|
41847
|
-
decodeI420(
|
|
41503
|
+
decodeI420(image.data, width, height, step, output);
|
|
41848
41504
|
break;
|
|
41505
|
+
|
|
41506
|
+
//if (!navigator.gpu) {
|
|
41507
|
+
// console.warn('WebGPU not supported, falling back to CPU');
|
|
41508
|
+
// decodeI420(image.data as Uint8Array, width, height, step, output);
|
|
41509
|
+
// return;
|
|
41510
|
+
//}
|
|
41511
|
+
//
|
|
41512
|
+
//const res = await decodeI420ToRGBA(image.data as Uint8Array, width, height);
|
|
41513
|
+
//output.set(res);
|
|
41514
|
+
//break;
|
|
41849
41515
|
case "bayer_rggb8":
|
|
41850
|
-
decodeBayerRGGB8(
|
|
41516
|
+
decodeBayerRGGB8(image.data, width, height, step, output);
|
|
41851
41517
|
break;
|
|
41852
41518
|
case "bayer_bggr8":
|
|
41853
|
-
decodeBayerBGGR8(
|
|
41519
|
+
decodeBayerBGGR8(image.data, width, height, step, output);
|
|
41854
41520
|
break;
|
|
41855
41521
|
case "bayer_gbrg8":
|
|
41856
|
-
decodeBayerGBRG8(
|
|
41522
|
+
decodeBayerGBRG8(image.data, width, height, step, output);
|
|
41857
41523
|
break;
|
|
41858
41524
|
case "bayer_grbg8":
|
|
41859
|
-
decodeBayerGRBG8(
|
|
41525
|
+
decodeBayerGRBG8(image.data, width, height, step, output);
|
|
41860
41526
|
break;
|
|
41861
41527
|
case "mono8":
|
|
41862
41528
|
case "8UC1":
|
|
41863
|
-
decodeMono8(
|
|
41529
|
+
decodeMono8(image.data, width, height, step, output);
|
|
41864
41530
|
break;
|
|
41865
41531
|
case "mono16":
|
|
41866
41532
|
case "16UC1":
|
|
@@ -41880,7 +41546,7 @@ function decodeRawImage(image, options, output) {
|
|
|
41880
41546
|
a: 0
|
|
41881
41547
|
};
|
|
41882
41548
|
const converter = getColorConverter(settings, min, max);
|
|
41883
|
-
decodeMono16(
|
|
41549
|
+
decodeMono16(image.data, width, height, step, is_bigendian, output, {
|
|
41884
41550
|
minValue: options.minValue,
|
|
41885
41551
|
maxValue: options.maxValue,
|
|
41886
41552
|
colorConverter: value => {
|
|
@@ -41895,4 +41561,4 @@ function decodeRawImage(image, options, output) {
|
|
|
41895
41561
|
}
|
|
41896
41562
|
}
|
|
41897
41563
|
|
|
41898
|
-
export {
|
|
41564
|
+
export { Loader as $, rgbaToLinear as A, Box3 as B, Color as C, DoubleSide as D, RedFormat as E, Float32BufferAttribute as F, RGBAFormat as G, getColorConverter as H, InstancedBufferGeometry as I, FloatType as J, UnsignedByteType as K, Line3 as L, Matrix4 as M, NotEqualStencilFunc as N, Object3D as O, PointsMaterial as P, NEEDS_MIN_MAX as Q, ReplaceStencilOp as R, Sphere as S, InstancedMesh as T, UniformsLib as U, Vector3 as V, WireframeGeometry as W, CylinderGeometry as X, ConeGeometry as Y, DataTextureLoader as Z, LinearMipmapLinearFilter as _, InstancedInterleavedBuffer as a, StaticDrawUsage as a$, LoaderUtils as a0, FileLoader as a1, MeshBasicMaterial as a2, Scene as a3, TextureLoader as a4, AnimationClip as a5, VectorKeyframeTrack as a6, QuaternionKeyframeTrack as a7, MeshLambertMaterial as a8, MeshPhongMaterial as a9, LineLoop as aA, Points as aB, InterpolateLinear as aC, ColorManagement as aD, NearestMipmapNearestFilter as aE, LinearMipmapNearestFilter as aF, NearestMipmapLinearFilter as aG, MirroredRepeatWrapping as aH, InterpolateDiscrete as aI, Texture as aJ, NumberKeyframeTrack as aK, Interpolant as aL, EdgesGeometry as aM, LoadingManager as aN, stringToRgb as aO, getLuminance as aP, Euler as aQ, vec3TupleApproxEquals as aR, decodeCompressedImageToBitmap as aS, CanvasTexture as aT, Shape as aU, SRGBToLinear as aV, ShapeGeometry as aW, DynamicDrawUsage as aX, ShaderChunk as aY, IMAGE_DEFAULT_COLOR_MODE_SETTINGS as aZ, colorHasTransparency as a_, FrontSide as aa, PerspectiveCamera as ab, OrthographicCamera as ac, AmbientLight as ad, SpotLight as ae, PointLight as af, DirectionalLight as ag, BufferGeometry as ah, Group as ai, Quaternion as aj, Bone as ak, LineBasicMaterial as al, SkinnedMesh as am, Line as an, LineSegments as ao, RepeatWrapping as ap, Skeleton as aq, BufferAttribute as ar, TrianglesDrawMode as as, TriangleFanDrawMode as at, TriangleStripDrawMode as au, MeshPhysicalMaterial as av, ImageBitmapLoader as aw, InterleavedBuffer as ax, Material as ay, PropertyBinding as az, InterleavedBufferAttribute as b, RawShaderMaterial as b0, GLSL3 as b1, colorFieldComputedPrefix as b2, getRotationTo as b3, SphereGeometry as b4, rgbaGradient as b5, InstancedBufferAttribute as b6, BoxGeometry as b7, DARK_OUTLINE as b8, LIGHT_OUTLINE as b9, CircleGeometry as ba, LineDashedMaterial as bb, GreaterDepth as bc, EventDispatcher as bd, Plane as be, Raycaster as bf, WebGLRenderTarget as bg, Ray as bh, MOUSE as bi, TOUCH as bj, Spherical as bk, WebGLRenderer as bl, NoToneMapping as bm, VSMShadowMap as bn, HemisphereLight as bo, Vector2 as c, decodeRawImage as d, ShaderLib as e, UniformsUtils as f, ShaderMaterial as g, Vector4 as h, Mesh as i, MathUtils as j, MeshStandardMaterial as k, rgbaToCssString as l, makeRgba as m, colorModeSettingsFields as n, autoSelectColorSettings as o, PlaneGeometry as p, DataTexture as q, rgbToThreeColor as r, stringToRgba as s, UVMapping as t, ClampToEdgeWrapping as u, NearestFilter as v, LinearFilter as w, FS_SRGB_TO_LINEAR as x, SRGBColorSpace as y, LinearSRGBColorSpace as z };
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aq as styleTags, ar as tags, at as LanguageSupport, av as LRParser } from './index-
|
|
1
|
+
import { as as LRLanguage, an as indentNodeProp, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aq as styleTags, ar as tags, at as LanguageSupport, av as LRParser } from './index-D8jKQuGu.js';
|
|
2
2
|
import './FoxgloveServer-DiLI7KZU.js';
|
|
3
3
|
import 'protobufjs/minimal';
|
|
4
4
|
import 'ms';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aK as html, at as LanguageSupport, aL as parseMixed } from './index-
|
|
1
|
+
import { au as ExternalTokenizer, aq as styleTags, ar as tags, av as LRParser, as as LRLanguage, an as indentNodeProp, ao as continuedIndent, aA as delimitedIndent, ap as foldNodeProp, aB as foldInside, aK as html, at as LanguageSupport, aL as parseMixed } from './index-D8jKQuGu.js';
|
|
2
2
|
import './FoxgloveServer-DiLI7KZU.js';
|
|
3
3
|
import 'protobufjs/minimal';
|
|
4
4
|
import 'ms';
|