@mediapipe/tasks-vision 0.10.34 → 0.10.35
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/package.json +1 -1
- package/vision_bundle.cjs +1 -1
- package/vision_bundle.cjs.map +1 -1
- package/vision_bundle.mjs +1 -1
- package/vision_bundle.mjs.map +1 -1
- package/wasm/vision_wasm_internal.js +109 -126
- package/wasm/vision_wasm_internal.wasm +0 -0
- package/wasm/vision_wasm_module_internal.js +112 -129
- package/wasm/vision_wasm_module_internal.wasm +0 -0
- package/wasm/vision_wasm_nosimd_internal.js +109 -126
- package/wasm/vision_wasm_nosimd_internal.wasm +0 -0
|
@@ -198,14 +198,17 @@ var EXITSTATUS;
|
|
|
198
198
|
// include: runtime_stack_check.js
|
|
199
199
|
// end include: runtime_stack_check.js
|
|
200
200
|
// include: runtime_exceptions.js
|
|
201
|
+
// Base Emscripten EH error class
|
|
202
|
+
class EmscriptenEH {}
|
|
203
|
+
|
|
204
|
+
class EmscriptenSjLj extends EmscriptenEH {}
|
|
205
|
+
|
|
201
206
|
// end include: runtime_exceptions.js
|
|
202
207
|
// include: runtime_debug.js
|
|
203
208
|
// end include: runtime_debug.js
|
|
204
209
|
var readyPromiseResolve, readyPromiseReject;
|
|
205
210
|
|
|
206
211
|
// Memory management
|
|
207
|
-
var /** @type {!Int8Array} */ HEAP8, /** @type {!Uint8Array} */ HEAPU8, /** @type {!Int16Array} */ HEAP16, /** @type {!Uint16Array} */ HEAPU16, /** @type {!Int32Array} */ HEAP32, /** @type {!Uint32Array} */ HEAPU32, /** @type {!Float32Array} */ HEAPF32, /** @type {!Float64Array} */ HEAPF64;
|
|
208
|
-
|
|
209
212
|
var runtimeInitialized = false;
|
|
210
213
|
|
|
211
214
|
function updateMemoryViews() {
|
|
@@ -257,9 +260,11 @@ function postRun() {
|
|
|
257
260
|
callRuntimeCallbacks(onPostRuns);
|
|
258
261
|
}
|
|
259
262
|
|
|
260
|
-
/**
|
|
263
|
+
/**
|
|
264
|
+
* @param {string|number=} what
|
|
265
|
+
*/ function abort(what) {
|
|
261
266
|
Module["onAbort"]?.(what);
|
|
262
|
-
what =
|
|
267
|
+
what = `Aborted(${what})`;
|
|
263
268
|
// TODO(sbc): Should we remove printing and leave it up to whoever
|
|
264
269
|
// catches the exception?
|
|
265
270
|
err(what);
|
|
@@ -289,10 +294,10 @@ var wasmBinaryFile;
|
|
|
289
294
|
|
|
290
295
|
function findWasmBinary() {
|
|
291
296
|
if (Module["locateFile"]) {
|
|
292
|
-
return locateFile("
|
|
297
|
+
return locateFile("vision_wasm_module_raw_internal.wasm");
|
|
293
298
|
}
|
|
294
299
|
// Use bundler-friendly `new URL(..., import.meta.url)` pattern; works in browsers too.
|
|
295
|
-
return new URL("
|
|
300
|
+
return new URL("vision_wasm_module_raw_internal.wasm", import.meta.url).href;
|
|
296
301
|
}
|
|
297
302
|
|
|
298
303
|
function getBinarySync(file) {
|
|
@@ -934,6 +939,22 @@ var Browser = {
|
|
|
934
939
|
}
|
|
935
940
|
};
|
|
936
941
|
|
|
942
|
+
/** @type {!Int16Array} */ var HEAP16;
|
|
943
|
+
|
|
944
|
+
/** @type {!Int32Array} */ var HEAP32;
|
|
945
|
+
|
|
946
|
+
/** @type {!Int8Array} */ var HEAP8;
|
|
947
|
+
|
|
948
|
+
/** @type {!Float32Array} */ var HEAPF32;
|
|
949
|
+
|
|
950
|
+
/** @type {!Float64Array} */ var HEAPF64;
|
|
951
|
+
|
|
952
|
+
/** @type {!Uint16Array} */ var HEAPU16;
|
|
953
|
+
|
|
954
|
+
/** @type {!Uint32Array} */ var HEAPU32;
|
|
955
|
+
|
|
956
|
+
/** @type {!Uint8Array} */ var HEAPU8;
|
|
957
|
+
|
|
937
958
|
var callRuntimeCallbacks = callbacks => {
|
|
938
959
|
while (callbacks.length > 0) {
|
|
939
960
|
// Pass the module as the first argument.
|
|
@@ -1001,17 +1022,14 @@ class ExceptionInfo {
|
|
|
1001
1022
|
}
|
|
1002
1023
|
}
|
|
1003
1024
|
|
|
1004
|
-
var exceptionLast = 0;
|
|
1005
|
-
|
|
1006
1025
|
var uncaughtExceptionCount = 0;
|
|
1007
1026
|
|
|
1008
1027
|
var ___cxa_throw = (ptr, type, destructor) => {
|
|
1009
1028
|
var info = new ExceptionInfo(ptr);
|
|
1010
1029
|
// Initialize ExceptionInfo content after it was allocated in __cxa_allocate_exception.
|
|
1011
1030
|
info.init(type, destructor);
|
|
1012
|
-
exceptionLast = ptr;
|
|
1013
1031
|
uncaughtExceptionCount++;
|
|
1014
|
-
|
|
1032
|
+
abort();
|
|
1015
1033
|
};
|
|
1016
1034
|
|
|
1017
1035
|
var PATH = {
|
|
@@ -1078,13 +1096,10 @@ var initRandomFill = () => {
|
|
|
1078
1096
|
var nodeCrypto = require("node:crypto");
|
|
1079
1097
|
return view => nodeCrypto.randomFillSync(view);
|
|
1080
1098
|
}
|
|
1081
|
-
return view => crypto.getRandomValues(view);
|
|
1099
|
+
return view => (crypto.getRandomValues(view), 0);
|
|
1082
1100
|
};
|
|
1083
1101
|
|
|
1084
|
-
var randomFill = view =>
|
|
1085
|
-
// Lazily init on the first invocation.
|
|
1086
|
-
(randomFill = initRandomFill())(view);
|
|
1087
|
-
};
|
|
1102
|
+
var randomFill = view => (randomFill = initRandomFill())(view);
|
|
1088
1103
|
|
|
1089
1104
|
var PATH_FS = {
|
|
1090
1105
|
resolve: (...args) => {
|
|
@@ -1479,12 +1494,14 @@ var MEMFS = {
|
|
|
1479
1494
|
} else if (FS.isFile(node.mode)) {
|
|
1480
1495
|
node.node_ops = MEMFS.ops_table.file.node;
|
|
1481
1496
|
node.stream_ops = MEMFS.ops_table.file.stream;
|
|
1497
|
+
// The actual number of bytes used in the typed array, as opposed to
|
|
1498
|
+
// contents.length which gives the whole capacity.
|
|
1482
1499
|
node.usedBytes = 0;
|
|
1483
|
-
// The
|
|
1484
|
-
//
|
|
1485
|
-
//
|
|
1486
|
-
//
|
|
1487
|
-
node.contents =
|
|
1500
|
+
// The byte data of the file is stored in a typed array.
|
|
1501
|
+
// Note: typed arrays are not resizable like normal JS arrays are, so
|
|
1502
|
+
// there is a small penalty involved for appending file writes that
|
|
1503
|
+
// continuously grow a file similar to std::vector capacity vs used.
|
|
1504
|
+
node.contents = MEMFS.emptyFileContents ??= new Uint8Array(0);
|
|
1488
1505
|
} else if (FS.isLink(node.mode)) {
|
|
1489
1506
|
node.node_ops = MEMFS.ops_table.link.node;
|
|
1490
1507
|
node.stream_ops = MEMFS.ops_table.link.stream;
|
|
@@ -1501,42 +1518,34 @@ var MEMFS = {
|
|
|
1501
1518
|
return node;
|
|
1502
1519
|
},
|
|
1503
1520
|
getFileDataAsTypedArray(node) {
|
|
1504
|
-
|
|
1505
|
-
if (node.contents.subarray) return node.contents.subarray(0, node.usedBytes);
|
|
1506
|
-
// Make sure to not return excess unused bytes.
|
|
1507
|
-
return new Uint8Array(node.contents);
|
|
1521
|
+
return node.contents.subarray(0, node.usedBytes);
|
|
1508
1522
|
},
|
|
1509
1523
|
expandFileStorage(node, newCapacity) {
|
|
1510
|
-
var prevCapacity = node.contents
|
|
1524
|
+
var prevCapacity = node.contents.length;
|
|
1511
1525
|
if (prevCapacity >= newCapacity) return;
|
|
1512
1526
|
// No need to expand, the storage was already large enough.
|
|
1513
|
-
// Don't expand strictly to the given requested limit if it's only a very
|
|
1514
|
-
//
|
|
1515
|
-
//
|
|
1527
|
+
// Don't expand strictly to the given requested limit if it's only a very
|
|
1528
|
+
// small increase, but instead geometrically grow capacity.
|
|
1529
|
+
// For small filesizes (<1MB), perform size*2 geometric increase, but for
|
|
1530
|
+
// large sizes, do a much more conservative size*1.125 increase to avoid
|
|
1531
|
+
// overshooting the allocation cap by a very large margin.
|
|
1516
1532
|
var CAPACITY_DOUBLING_MAX = 1024 * 1024;
|
|
1517
1533
|
newCapacity = Math.max(newCapacity, (prevCapacity * (prevCapacity < CAPACITY_DOUBLING_MAX ? 2 : 1.125)) >>> 0);
|
|
1518
|
-
if (prevCapacity
|
|
1534
|
+
if (prevCapacity) newCapacity = Math.max(newCapacity, 256);
|
|
1519
1535
|
// At minimum allocate 256b for each file when expanding.
|
|
1520
|
-
var oldContents = node
|
|
1536
|
+
var oldContents = MEMFS.getFileDataAsTypedArray(node);
|
|
1521
1537
|
node.contents = new Uint8Array(newCapacity);
|
|
1522
1538
|
// Allocate new storage.
|
|
1523
|
-
|
|
1539
|
+
node.contents.set(oldContents);
|
|
1524
1540
|
},
|
|
1525
1541
|
resizeFileStorage(node, newSize) {
|
|
1526
1542
|
if (node.usedBytes == newSize) return;
|
|
1527
|
-
|
|
1528
|
-
|
|
1529
|
-
|
|
1530
|
-
|
|
1531
|
-
|
|
1532
|
-
|
|
1533
|
-
node.contents = new Uint8Array(newSize);
|
|
1534
|
-
// Allocate new storage.
|
|
1535
|
-
if (oldContents) {
|
|
1536
|
-
node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)));
|
|
1537
|
-
}
|
|
1538
|
-
node.usedBytes = newSize;
|
|
1539
|
-
}
|
|
1543
|
+
var oldContents = node.contents;
|
|
1544
|
+
node.contents = new Uint8Array(newSize);
|
|
1545
|
+
// Allocate new storage.
|
|
1546
|
+
node.contents.set(oldContents.subarray(0, Math.min(newSize, node.usedBytes)));
|
|
1547
|
+
// Copy old data over to the new storage.
|
|
1548
|
+
node.usedBytes = newSize;
|
|
1540
1549
|
},
|
|
1541
1550
|
node_ops: {
|
|
1542
1551
|
getattr(node) {
|
|
@@ -1641,12 +1650,7 @@ var MEMFS = {
|
|
|
1641
1650
|
var contents = stream.node.contents;
|
|
1642
1651
|
if (position >= stream.node.usedBytes) return 0;
|
|
1643
1652
|
var size = Math.min(stream.node.usedBytes - position, length);
|
|
1644
|
-
|
|
1645
|
-
// non-trivial, and typed array
|
|
1646
|
-
buffer.set(contents.subarray(position, position + size), offset);
|
|
1647
|
-
} else {
|
|
1648
|
-
for (var i = 0; i < size; i++) buffer[offset + i] = contents[position + i];
|
|
1649
|
-
}
|
|
1653
|
+
buffer.set(contents.subarray(position, position + size), offset);
|
|
1650
1654
|
return size;
|
|
1651
1655
|
},
|
|
1652
1656
|
write(stream, buffer, offset, length, position, canOwn) {
|
|
@@ -1660,34 +1664,19 @@ var MEMFS = {
|
|
|
1660
1664
|
if (!length) return 0;
|
|
1661
1665
|
var node = stream.node;
|
|
1662
1666
|
node.mtime = node.ctime = Date.now();
|
|
1663
|
-
if (
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
node.usedBytes = length;
|
|
1673
|
-
return length;
|
|
1674
|
-
} else if (position + length <= node.usedBytes) {
|
|
1675
|
-
// Writing to an already allocated and used subrange of the file?
|
|
1676
|
-
node.contents.set(buffer.subarray(offset, offset + length), position);
|
|
1677
|
-
return length;
|
|
1678
|
-
}
|
|
1679
|
-
}
|
|
1680
|
-
// Appending to an existing file and we need to reallocate, or source data did not come as a typed array.
|
|
1681
|
-
MEMFS.expandFileStorage(node, position + length);
|
|
1682
|
-
if (node.contents.subarray && buffer.subarray) {
|
|
1667
|
+
if (canOwn) {
|
|
1668
|
+
node.contents = buffer.subarray(offset, offset + length);
|
|
1669
|
+
node.usedBytes = length;
|
|
1670
|
+
} else if (node.usedBytes === 0 && position === 0) {
|
|
1671
|
+
// If this is a simple first write to an empty file, do a fast set since we don't need to care about old data.
|
|
1672
|
+
node.contents = buffer.slice(offset, offset + length);
|
|
1673
|
+
node.usedBytes = length;
|
|
1674
|
+
} else {
|
|
1675
|
+
MEMFS.expandFileStorage(node, position + length);
|
|
1683
1676
|
// Use typed array write which is available.
|
|
1684
1677
|
node.contents.set(buffer.subarray(offset, offset + length), position);
|
|
1685
|
-
|
|
1686
|
-
for (var i = 0; i < length; i++) {
|
|
1687
|
-
node.contents[position + i] = buffer[offset + i];
|
|
1688
|
-
}
|
|
1678
|
+
node.usedBytes = Math.max(node.usedBytes, position + length);
|
|
1689
1679
|
}
|
|
1690
|
-
node.usedBytes = Math.max(node.usedBytes, position + length);
|
|
1691
1680
|
return length;
|
|
1692
1681
|
},
|
|
1693
1682
|
llseek(stream, offset, whence) {
|
|
@@ -1712,7 +1701,7 @@ var MEMFS = {
|
|
|
1712
1701
|
var allocated;
|
|
1713
1702
|
var contents = stream.node.contents;
|
|
1714
1703
|
// Only make a new copy when MAP_PRIVATE is specified.
|
|
1715
|
-
if (!(flags & 2) && contents
|
|
1704
|
+
if (!(flags & 2) && contents.buffer === HEAP8.buffer) {
|
|
1716
1705
|
// We can't emulate MAP_SHARED when the file is not backed by the
|
|
1717
1706
|
// buffer we're mapping to (e.g. the HEAP buffer).
|
|
1718
1707
|
allocated = false;
|
|
@@ -1749,6 +1738,7 @@ var MEMFS = {
|
|
|
1749
1738
|
};
|
|
1750
1739
|
|
|
1751
1740
|
var FS_modeStringToFlags = str => {
|
|
1741
|
+
if (typeof str != "string") return str;
|
|
1752
1742
|
var flagModes = {
|
|
1753
1743
|
"r": 0,
|
|
1754
1744
|
"r+": 2,
|
|
@@ -1764,6 +1754,16 @@ var FS_modeStringToFlags = str => {
|
|
|
1764
1754
|
return flags;
|
|
1765
1755
|
};
|
|
1766
1756
|
|
|
1757
|
+
var FS_fileDataToTypedArray = data => {
|
|
1758
|
+
if (typeof data == "string") {
|
|
1759
|
+
data = intArrayFromString(data, true);
|
|
1760
|
+
}
|
|
1761
|
+
if (!data.subarray) {
|
|
1762
|
+
data = new Uint8Array(data);
|
|
1763
|
+
}
|
|
1764
|
+
return data;
|
|
1765
|
+
};
|
|
1766
|
+
|
|
1767
1767
|
var FS_getMode = (canRead, canWrite) => {
|
|
1768
1768
|
var mode = 0;
|
|
1769
1769
|
if (canRead) mode |= 292 | 73;
|
|
@@ -2740,7 +2740,7 @@ var FS = {
|
|
|
2740
2740
|
if (path === "") {
|
|
2741
2741
|
throw new FS.ErrnoError(44);
|
|
2742
2742
|
}
|
|
2743
|
-
flags =
|
|
2743
|
+
flags = FS_modeStringToFlags(flags);
|
|
2744
2744
|
if ((flags & 64)) {
|
|
2745
2745
|
mode = (mode & 4095) | 32768;
|
|
2746
2746
|
} else {
|
|
@@ -2972,14 +2972,8 @@ var FS = {
|
|
|
2972
2972
|
writeFile(path, data, opts = {}) {
|
|
2973
2973
|
opts.flags = opts.flags || 577;
|
|
2974
2974
|
var stream = FS.open(path, opts.flags, opts.mode);
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
}
|
|
2978
|
-
if (ArrayBuffer.isView(data)) {
|
|
2979
|
-
FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
|
|
2980
|
-
} else {
|
|
2981
|
-
abort("Unsupported data type");
|
|
2982
|
-
}
|
|
2975
|
+
data = FS_fileDataToTypedArray(data);
|
|
2976
|
+
FS.write(stream, data, 0, data.byteLength, undefined, opts.canOwn);
|
|
2983
2977
|
FS.close(stream);
|
|
2984
2978
|
},
|
|
2985
2979
|
cwd: () => FS.currentPath,
|
|
@@ -3209,11 +3203,7 @@ var FS = {
|
|
|
3209
3203
|
var mode = FS_getMode(canRead, canWrite);
|
|
3210
3204
|
var node = FS.create(path, mode);
|
|
3211
3205
|
if (data) {
|
|
3212
|
-
|
|
3213
|
-
var arr = new Array(data.length);
|
|
3214
|
-
for (var i = 0, len = data.length; i < len; ++i) arr[i] = data.charCodeAt(i);
|
|
3215
|
-
data = arr;
|
|
3216
|
-
}
|
|
3206
|
+
data = FS_fileDataToTypedArray(data);
|
|
3217
3207
|
// make sure we can write to the file
|
|
3218
3208
|
FS.chmod(node, mode | 146);
|
|
3219
3209
|
var stream = FS.open(node, 577);
|
|
@@ -3944,6 +3934,7 @@ var emval_handles = [ 0, 1, , 1, null, 1, true, 1, false, 1 ];
|
|
|
3944
3934
|
|
|
3945
3935
|
var __emval_decref = handle => {
|
|
3946
3936
|
if (handle > 9 && 0 === --emval_handles[handle + 1]) {
|
|
3937
|
+
var value = emval_handles[handle];
|
|
3947
3938
|
emval_handles[handle] = undefined;
|
|
3948
3939
|
emval_freelist.push(handle);
|
|
3949
3940
|
}
|
|
@@ -5845,7 +5836,7 @@ var WebGPU = {
|
|
|
5845
5836
|
ToneMappingMode: [ , "standard", "extended" ],
|
|
5846
5837
|
VertexFormat: [ , "uint8", "uint8x2", "uint8x4", "sint8", "sint8x2", "sint8x4", "unorm8", "unorm8x2", "unorm8x4", "snorm8", "snorm8x2", "snorm8x4", "uint16", "uint16x2", "uint16x4", "sint16", "sint16x2", "sint16x4", "unorm16", "unorm16x2", "unorm16x4", "snorm16", "snorm16x2", "snorm16x4", "float16", "float16x2", "float16x4", "float32", "float32x2", "float32x3", "float32x4", "uint32", "uint32x2", "uint32x3", "uint32x4", "sint32", "sint32x2", "sint32x3", "sint32x4", "unorm10-10-10-2", "unorm8x4-bgra" ],
|
|
5847
5838
|
VertexStepMode: [ , "vertex", "instance" ],
|
|
5848
|
-
WGSLLanguageFeatureName: [ , "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1" ]
|
|
5839
|
+
WGSLLanguageFeatureName: [ , "readonly_and_readwrite_storage_textures", "packed_4x8_integer_dot_product", "unrestricted_pointer_parameters", "pointer_composite_access", "uniform_buffer_standard_layout", "subgroup_id", "texture_and_sampler_let", "subgroup_uniformity", "texture_formats_tier1", "linear_indexing" ]
|
|
5849
5840
|
};
|
|
5850
5841
|
|
|
5851
5842
|
var _emscripten_webgpu_get_device = () => {
|
|
@@ -7453,15 +7444,7 @@ function _mediapipe_webgl_tex_image_drawable(drawableHandle) {
|
|
|
7453
7444
|
GLctx.texImage2D(GLctx.TEXTURE_2D, 0, GLctx.RGBA, GLctx.RGBA, GLctx.UNSIGNED_BYTE, drawable);
|
|
7454
7445
|
}
|
|
7455
7446
|
|
|
7456
|
-
|
|
7457
|
-
try {
|
|
7458
|
-
randomFill(HEAPU8.subarray(buffer, buffer + size));
|
|
7459
|
-
return 0;
|
|
7460
|
-
} catch (e) {
|
|
7461
|
-
if (typeof FS == "undefined" || !(e.name === "ErrnoError")) throw e;
|
|
7462
|
-
return e.errno;
|
|
7463
|
-
}
|
|
7464
|
-
}
|
|
7447
|
+
var _random_get = (buffer, size) => randomFill(HEAPU8.subarray(buffer, buffer + size));
|
|
7465
7448
|
|
|
7466
7449
|
var _wgpuCommandEncoderBeginComputePass = (encoderPtr, descriptor) => {
|
|
7467
7450
|
var desc;
|
|
@@ -8069,12 +8052,12 @@ Module["FS_createLazyFile"] = FS_createLazyFile;
|
|
|
8069
8052
|
// End JS library exports
|
|
8070
8053
|
// end include: postlibrary.js
|
|
8071
8054
|
var ASM_CONSTS = {
|
|
8072
|
-
|
|
8055
|
+
1462283: $0 => {
|
|
8073
8056
|
const canvas = Emval.toValue($0);
|
|
8074
8057
|
const context = canvas.getContext("webgpu");
|
|
8075
8058
|
return WebGPU.importJsTexture(context.getCurrentTexture());
|
|
8076
8059
|
},
|
|
8077
|
-
|
|
8060
|
+
1462426: ($0, $1, $2, $3, $4) => {
|
|
8078
8061
|
const drawable = Emval.toValue($0);
|
|
8079
8062
|
const device = WebGPU.getJsObject($1);
|
|
8080
8063
|
const texture = WebGPU.getJsObject($2);
|
|
@@ -8086,7 +8069,7 @@ var ASM_CONSTS = {
|
|
|
8086
8069
|
texture
|
|
8087
8070
|
}, [ width, height ]);
|
|
8088
8071
|
},
|
|
8089
|
-
|
|
8072
|
+
1462685: ($0, $1, $2, $3) => {
|
|
8090
8073
|
const sourceExtTex = Emval.toValue($0);
|
|
8091
8074
|
const device = WebGPU.getJsObject($1);
|
|
8092
8075
|
const sampler = WebGPU.getJsObject($2);
|
|
@@ -8103,29 +8086,29 @@ var ASM_CONSTS = {
|
|
|
8103
8086
|
});
|
|
8104
8087
|
return WebGPU.importJsBindGroup(bindGroup);
|
|
8105
8088
|
},
|
|
8106
|
-
|
|
8089
|
+
1463055: ($0, $1) => {
|
|
8107
8090
|
const input = Emval.toValue($0);
|
|
8108
8091
|
const output = Emval.toValue($1);
|
|
8109
8092
|
const ctx = output.getContext("2d");
|
|
8110
8093
|
ctx.drawImage(input, 0, 0, output.width, output.height);
|
|
8111
8094
|
},
|
|
8112
|
-
|
|
8095
|
+
1463220: ($0, $1) => {
|
|
8113
8096
|
const inputArray = Emval.toValue($0);
|
|
8114
8097
|
const output = Emval.toValue($1);
|
|
8115
8098
|
const ctx = output.getContext("2d");
|
|
8116
8099
|
const image_data = new ImageData(inputArray, output.width, output.height);
|
|
8117
8100
|
ctx.putImageData(image_data, 0, 0);
|
|
8118
8101
|
},
|
|
8119
|
-
|
|
8102
|
+
1463444: ($0, $1) => {
|
|
8120
8103
|
const input = Emval.toValue($0);
|
|
8121
8104
|
const outputArray = Emval.toValue($1);
|
|
8122
8105
|
const ctx = input.getContext("2d");
|
|
8123
8106
|
const data = ctx.getImageData(0, 0, input.width, input.height);
|
|
8124
8107
|
outputArray.set(data.data);
|
|
8125
8108
|
},
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8109
|
+
1463648: () => (typeof HTMLCanvasElement !== "undefined"),
|
|
8110
|
+
1463703: () => !!Module["preinitializedWebGPUDevice"],
|
|
8111
|
+
1463754: () => {
|
|
8129
8112
|
specialHTMLTargets["#canvas"] = Module.canvas;
|
|
8130
8113
|
}
|
|
8131
8114
|
};
|
|
@@ -8376,7 +8359,7 @@ function custom_emscripten_dbgn(str, len) {
|
|
|
8376
8359
|
}
|
|
8377
8360
|
|
|
8378
8361
|
// Imports from the Wasm binary.
|
|
8379
|
-
var _free, _malloc, _wgpuDeviceAddRef, _addBoundTextureAsImageToStream, _attachImageListener, _attachImageVectorListener, _registerModelResourcesGraphService, _bindTextureToStream, _addBoundTextureToStream, _addDoubleToInputStream, _addFloatToInputStream, _addBoolToInputStream, _addIntToInputStream, _addUintToInputStream, _addStringToInputStream, _addRawDataSpanToInputStream, _allocateBoolVector, _allocateFloatVector, _allocateDoubleVector, _allocateIntVector, _allocateUintVector, _allocateStringVector, _addBoolVectorEntry, _addFloatVectorEntry, _addDoubleVectorEntry, _addIntVectorEntry, _addUintVectorEntry, _addStringVectorEntry, _addBoolVectorToInputStream, _addFloatVectorToInputStream, _addDoubleVectorToInputStream, _addIntVectorToInputStream, _addUintVectorToInputStream, _addStringVectorToInputStream, _addFlatHashMapToInputStream, _addProtoToInputStream, _addEmptyPacketToInputStream, _addBoolToInputSidePacket, _addDoubleToInputSidePacket, _addFloatToInputSidePacket, _addIntToInputSidePacket, _addUintToInputSidePacket, _addStringToInputSidePacket, _addRawDataSpanToInputSidePacket, _addProtoToInputSidePacket, _addBoolVectorToInputSidePacket, _addDoubleVectorToInputSidePacket, _addFloatVectorToInputSidePacket, _addIntVectorToInputSidePacket, _addUintVectorToInputSidePacket, _addStringVectorToInputSidePacket, _attachBoolListener, _attachBoolVectorListener, _attachDoubleListener, _attachDoubleVectorListener, _attachFloatListener, _attachFloatVectorListener, _attachIntListener, _attachIntVectorListener, _attachUintListener, _attachUintVectorListener, _attachStringListener, _attachStringVectorListener, _attachProtoListener, _attachProtoVectorListener, _getGraphConfig, ___getTypeName, _emwgpuCreateBindGroup, _emwgpuCreateBindGroupLayout, _emwgpuCreateCommandBuffer, _emwgpuCreateCommandEncoder, _emwgpuCreateComputePassEncoder, _emwgpuCreateComputePipeline, _emwgpuCreateExternalTexture, _emwgpuCreatePipelineLayout, _emwgpuCreateQuerySet, _emwgpuCreateRenderBundle, _emwgpuCreateRenderBundleEncoder, _emwgpuCreateRenderPassEncoder, _emwgpuCreateRenderPipeline, _emwgpuCreateSampler, _emwgpuCreateSurface, _emwgpuCreateTexture, _emwgpuCreateTextureView, _emwgpuCreateAdapter, _emwgpuImportBuffer, _emwgpuCreateDevice, _emwgpuCreateQueue, _emwgpuCreateShaderModule, _emwgpuOnCreateComputePipelineCompleted, _emwgpuOnCreateRenderPipelineCompleted, _clearSubgraphs, _pushBinarySubgraph, _pushTextSubgraph, _changeBinaryGraph, _changeTextGraph, _processGl, _process, _bindTextureToCanvas, _requestShaderRefreshOnGraphChange, _waitUntilIdle, _closeGraph, _setAutoRenderToScreen, _emscripten_builtin_memalign, _memalign, __emscripten_tempret_set, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, dynCall_ji, dynCall_jii, dynCall_iiiijij, dynCall_viiji, dynCall_viji, dynCall_iiiji, dynCall_jjj, dynCall_iiiijj, dynCall_viijj, dynCall_viiijjj, dynCall_vij,
|
|
8362
|
+
var _free, _malloc, _wgpuDeviceAddRef, _addBoundTextureAsImageToStream, _attachImageListener, _attachImageVectorListener, _registerModelResourcesGraphService, _bindTextureToStream, _addBoundTextureToStream, _addDoubleToInputStream, _addFloatToInputStream, _addBoolToInputStream, _addIntToInputStream, _addUintToInputStream, _addStringToInputStream, _addRawDataSpanToInputStream, _allocateBoolVector, _allocateFloatVector, _allocateDoubleVector, _allocateIntVector, _allocateUintVector, _allocateStringVector, _addBoolVectorEntry, _addFloatVectorEntry, _addDoubleVectorEntry, _addIntVectorEntry, _addUintVectorEntry, _addStringVectorEntry, _addBoolVectorToInputStream, _addFloatVectorToInputStream, _addDoubleVectorToInputStream, _addIntVectorToInputStream, _addUintVectorToInputStream, _addStringVectorToInputStream, _addFlatHashMapToInputStream, _addProtoToInputStream, _addEmptyPacketToInputStream, _addBoolToInputSidePacket, _addDoubleToInputSidePacket, _addFloatToInputSidePacket, _addIntToInputSidePacket, _addUintToInputSidePacket, _addStringToInputSidePacket, _addRawDataSpanToInputSidePacket, _addProtoToInputSidePacket, _addBoolVectorToInputSidePacket, _addDoubleVectorToInputSidePacket, _addFloatVectorToInputSidePacket, _addIntVectorToInputSidePacket, _addUintVectorToInputSidePacket, _addStringVectorToInputSidePacket, _attachBoolListener, _attachBoolVectorListener, _attachDoubleListener, _attachDoubleVectorListener, _attachFloatListener, _attachFloatVectorListener, _attachIntListener, _attachIntVectorListener, _attachUintListener, _attachUintVectorListener, _attachStringListener, _attachStringVectorListener, _attachProtoListener, _attachProtoVectorListener, _getGraphConfig, ___getTypeName, _emwgpuCreateBindGroup, _emwgpuCreateBindGroupLayout, _emwgpuCreateCommandBuffer, _emwgpuCreateCommandEncoder, _emwgpuCreateComputePassEncoder, _emwgpuCreateComputePipeline, _emwgpuCreateExternalTexture, _emwgpuCreatePipelineLayout, _emwgpuCreateQuerySet, _emwgpuCreateRenderBundle, _emwgpuCreateRenderBundleEncoder, _emwgpuCreateRenderPassEncoder, _emwgpuCreateRenderPipeline, _emwgpuCreateSampler, _emwgpuCreateSurface, _emwgpuCreateTexture, _emwgpuCreateTextureView, _emwgpuCreateAdapter, _emwgpuImportBuffer, _emwgpuCreateDevice, _emwgpuCreateQueue, _emwgpuCreateShaderModule, _emwgpuOnCreateComputePipelineCompleted, _emwgpuOnCreateRenderPipelineCompleted, _clearSubgraphs, _pushBinarySubgraph, _pushTextSubgraph, _changeBinaryGraph, _changeTextGraph, _processGl, _process, _bindTextureToCanvas, _requestShaderRefreshOnGraphChange, _waitUntilIdle, _closeGraph, _setAutoRenderToScreen, _emscripten_builtin_memalign, _memalign, __emscripten_tempret_set, __emscripten_stack_restore, __emscripten_stack_alloc, _emscripten_stack_get_current, dynCall_ji, dynCall_jii, dynCall_iiiijij, dynCall_viiji, dynCall_viji, dynCall_iiiji, dynCall_jjj, dynCall_iiiijj, dynCall_viijj, dynCall_viiijjj, dynCall_vij, dynCall_viiiji, dynCall_viijii, dynCall_vijjj, dynCall_vj, dynCall_viij, dynCall_jiji, dynCall_iiiiij, dynCall_iiiiijj, dynCall_iiiiiijj, memory, _kVersionStampBuildChangelistStr, _kVersionStampCitcSnapshotStr, _kVersionStampCitcWorkspaceIdStr, _kVersionStampSourceUriStr, _kVersionStampBuildClientStr, _kVersionStampBuildClientMintStatusStr, _kVersionStampBuildCompilerStr, _kVersionStampBuildDateTimePstStr, _kVersionStampBuildDepotPathStr, _kVersionStampBuildIdStr, _kVersionStampBuildInfoStr, _kVersionStampBuildLabelStr, _kVersionStampBuildTargetStr, _kVersionStampBuildTimestampStr, _kVersionStampBuildToolStr, _kVersionStampG3BuildTargetStr, _kVersionStampVerifiableStr, _kVersionStampBuildFdoTypeStr, _kVersionStampBuildBaselineChangelistStr, _kVersionStampBuildLtoTypeStr, _kVersionStampBuildPropellerTypeStr, _kVersionStampBuildPghoTypeStr, _kVersionStampBuildUsernameStr, _kVersionStampBuildHostnameStr, _kVersionStampBuildDirectoryStr, _kVersionStampBuildChangelistInt, _kVersionStampCitcSnapshotInt, _kVersionStampBuildClientMintStatusInt, _kVersionStampBuildTimestampInt, _kVersionStampVerifiableInt, _kVersionStampBuildCoverageEnabledInt, _kVersionStampBuildBaselineChangelistInt, _kVersionStampPrecookedTimestampStr, _kVersionStampPrecookedClientInfoStr, __indirect_function_table, wasmMemory, wasmTable;
|
|
8380
8363
|
|
|
8381
8364
|
function assignWasmExports(wasmExports) {
|
|
8382
8365
|
_free = Module["_free"] = wasmExports["Td"];
|
|
@@ -8499,8 +8482,8 @@ function assignWasmExports(wasmExports) {
|
|
|
8499
8482
|
dynCall_viijj = wasmExports["dynCall_viijj"];
|
|
8500
8483
|
dynCall_viiijjj = wasmExports["dynCall_viiijjj"];
|
|
8501
8484
|
dynCall_vij = wasmExports["dynCall_vij"];
|
|
8502
|
-
dynCall_viijii = wasmExports["dynCall_viijii"];
|
|
8503
8485
|
dynCall_viiiji = wasmExports["dynCall_viiiji"];
|
|
8486
|
+
dynCall_viijii = wasmExports["dynCall_viijii"];
|
|
8504
8487
|
dynCall_vijjj = wasmExports["dynCall_vijjj"];
|
|
8505
8488
|
dynCall_vj = wasmExports["dynCall_vj"];
|
|
8506
8489
|
dynCall_viij = wasmExports["dynCall_viij"];
|
|
@@ -8565,7 +8548,7 @@ var wasmImports = {
|
|
|
8565
8548
|
/** @export */ Vc: JsOnSimpleListenerUint,
|
|
8566
8549
|
/** @export */ Uc: JsOnUint8ArrayImageListener,
|
|
8567
8550
|
/** @export */ Tc: JsOnUint8ArrayImageVectorListener,
|
|
8568
|
-
/** @export */
|
|
8551
|
+
/** @export */ P: JsOnVectorFinishedListener,
|
|
8569
8552
|
/** @export */ Sc: JsOnVectorListenerBool,
|
|
8570
8553
|
/** @export */ Rc: JsOnVectorListenerDouble,
|
|
8571
8554
|
/** @export */ Qc: JsOnVectorListenerFloat,
|
|
@@ -8596,7 +8579,7 @@ var wasmImports = {
|
|
|
8596
8579
|
/** @export */ xc: __embind_register_bool,
|
|
8597
8580
|
/** @export */ wc: __embind_register_emval,
|
|
8598
8581
|
/** @export */ jb: __embind_register_float,
|
|
8599
|
-
/** @export */
|
|
8582
|
+
/** @export */ J: __embind_register_integer,
|
|
8600
8583
|
/** @export */ q: __embind_register_memory_view,
|
|
8601
8584
|
/** @export */ vc: __embind_register_std_string,
|
|
8602
8585
|
/** @export */ Ma: __embind_register_std_wstring,
|
|
@@ -8636,7 +8619,7 @@ var wasmImports = {
|
|
|
8636
8619
|
/** @export */ jc: _emscripten_webgl_get_context_attributes,
|
|
8637
8620
|
/** @export */ ha: _emscripten_webgl_get_current_context,
|
|
8638
8621
|
/** @export */ ic: _emscripten_webgl_make_context_current,
|
|
8639
|
-
/** @export */
|
|
8622
|
+
/** @export */ R: _emscripten_webgpu_get_device,
|
|
8640
8623
|
/** @export */ hc: _emwgpuBufferDestroy,
|
|
8641
8624
|
/** @export */ gc: _emwgpuBufferGetMappedRange,
|
|
8642
8625
|
/** @export */ fc: _emwgpuBufferUnmap,
|
|
@@ -8665,15 +8648,15 @@ var wasmImports = {
|
|
|
8665
8648
|
/** @export */ cb: _glBlendEquation,
|
|
8666
8649
|
/** @export */ $b: _glBlendFunc,
|
|
8667
8650
|
/** @export */ j: _glBufferData,
|
|
8668
|
-
/** @export */
|
|
8669
|
-
/** @export */
|
|
8651
|
+
/** @export */ I: _glClear,
|
|
8652
|
+
/** @export */ H: _glClearColor,
|
|
8670
8653
|
/** @export */ da: _glClientWaitSync,
|
|
8671
8654
|
/** @export */ ga: _glColorMask,
|
|
8672
8655
|
/** @export */ bb: _glCompileShader,
|
|
8673
8656
|
/** @export */ ab: _glCreateProgram,
|
|
8674
8657
|
/** @export */ $a: _glCreateShader,
|
|
8675
8658
|
/** @export */ o: _glDeleteBuffers,
|
|
8676
|
-
/** @export */
|
|
8659
|
+
/** @export */ Q: _glDeleteFramebuffers,
|
|
8677
8660
|
/** @export */ h: _glDeleteProgram,
|
|
8678
8661
|
/** @export */ sa: _glDeleteShader,
|
|
8679
8662
|
/** @export */ ra: _glDeleteSync,
|
|
@@ -8692,7 +8675,7 @@ var wasmImports = {
|
|
|
8692
8675
|
/** @export */ C: _glFramebufferTexture2D,
|
|
8693
8676
|
/** @export */ Ya: _glFramebufferTextureLayer,
|
|
8694
8677
|
/** @export */ s: _glGenBuffers,
|
|
8695
|
-
/** @export */
|
|
8678
|
+
/** @export */ X: _glGenFramebuffers,
|
|
8696
8679
|
/** @export */ F: _glGenTextures,
|
|
8697
8680
|
/** @export */ B: _glGenVertexArrays,
|
|
8698
8681
|
/** @export */ Xa: _glGetAttribLocation,
|
|
@@ -8702,7 +8685,7 @@ var wasmImports = {
|
|
|
8702
8685
|
/** @export */ Yb: _glGetProgramiv,
|
|
8703
8686
|
/** @export */ Xb: _glGetShaderInfoLog,
|
|
8704
8687
|
/** @export */ Wb: _glGetShaderiv,
|
|
8705
|
-
/** @export */
|
|
8688
|
+
/** @export */ O: _glGetString,
|
|
8706
8689
|
/** @export */ Vb: _glGetUniformBlockIndex,
|
|
8707
8690
|
/** @export */ d: _glGetUniformLocation,
|
|
8708
8691
|
/** @export */ Ub: _glLineWidth,
|
|
@@ -8716,16 +8699,16 @@ var wasmImports = {
|
|
|
8716
8699
|
/** @export */ f: _glTexParameteri,
|
|
8717
8700
|
/** @export */ ma: _glTexStorage2D,
|
|
8718
8701
|
/** @export */ Tb: _glTexStorage3D,
|
|
8719
|
-
/** @export */
|
|
8702
|
+
/** @export */ W: _glTexSubImage2D,
|
|
8720
8703
|
/** @export */ Sb: _glTexSubImage3D,
|
|
8721
|
-
/** @export */
|
|
8704
|
+
/** @export */ N: _glUniform1f,
|
|
8722
8705
|
/** @export */ la: _glUniform1fv,
|
|
8723
8706
|
/** @export */ e: _glUniform1i,
|
|
8724
|
-
/** @export */
|
|
8707
|
+
/** @export */ V: _glUniform2f,
|
|
8725
8708
|
/** @export */ Rb: _glUniform2fv,
|
|
8726
8709
|
/** @export */ Ia: _glUniform3f,
|
|
8727
8710
|
/** @export */ Ta: _glUniform4f,
|
|
8728
|
-
/** @export */
|
|
8711
|
+
/** @export */ U: _glUniform4fv,
|
|
8729
8712
|
/** @export */ Qb: _glUniform4iv,
|
|
8730
8713
|
/** @export */ Pb: _glUniformBlockBinding,
|
|
8731
8714
|
/** @export */ Ob: _glUniformMatrix2fv,
|
|
@@ -8733,7 +8716,7 @@ var wasmImports = {
|
|
|
8733
8716
|
/** @export */ Ha: _glUniformMatrix4fv,
|
|
8734
8717
|
/** @export */ g: _glUseProgram,
|
|
8735
8718
|
/** @export */ k: _glVertexAttribPointer,
|
|
8736
|
-
/** @export */
|
|
8719
|
+
/** @export */ T: _glViewport,
|
|
8737
8720
|
/** @export */ Ga: hardware_concurrency,
|
|
8738
8721
|
/** @export */ Bb: mediapipe_create_utility_canvas2d,
|
|
8739
8722
|
/** @export */ Ab: _mediapipe_find_canvas_event_target,
|
|
@@ -8746,7 +8729,7 @@ var wasmImports = {
|
|
|
8746
8729
|
/** @export */ wb: _wgpuCommandEncoderCopyBufferToTexture,
|
|
8747
8730
|
/** @export */ vb: _wgpuCommandEncoderCopyTextureToBuffer,
|
|
8748
8731
|
/** @export */ ub: _wgpuCommandEncoderCopyTextureToTexture,
|
|
8749
|
-
/** @export */
|
|
8732
|
+
/** @export */ M: _wgpuCommandEncoderFinish,
|
|
8750
8733
|
/** @export */ Da: _wgpuComputePassEncoderDispatchWorkgroups,
|
|
8751
8734
|
/** @export */ Ca: _wgpuComputePassEncoderEnd,
|
|
8752
8735
|
/** @export */ Ba: _wgpuComputePassEncoderSetBindGroup,
|
|
@@ -8754,13 +8737,13 @@ var wasmImports = {
|
|
|
8754
8737
|
/** @export */ za: _wgpuComputePipelineGetBindGroupLayout,
|
|
8755
8738
|
/** @export */ ca: _wgpuDeviceCreateBindGroup,
|
|
8756
8739
|
/** @export */ tb: _wgpuDeviceCreateBindGroupLayout,
|
|
8757
|
-
/** @export */
|
|
8740
|
+
/** @export */ L: _wgpuDeviceCreateCommandEncoder,
|
|
8758
8741
|
/** @export */ sb: _wgpuDeviceCreateComputePipeline,
|
|
8759
8742
|
/** @export */ rb: _wgpuDeviceCreatePipelineLayout,
|
|
8760
8743
|
/** @export */ Sa: _wgpuDeviceCreateRenderPipeline,
|
|
8761
|
-
/** @export */
|
|
8744
|
+
/** @export */ S: _wgpuDeviceCreateSampler,
|
|
8762
8745
|
/** @export */ ba: _wgpuDeviceCreateTexture,
|
|
8763
|
-
/** @export */
|
|
8746
|
+
/** @export */ K: _wgpuQueueSubmit,
|
|
8764
8747
|
/** @export */ ka: _wgpuQueueWriteBuffer,
|
|
8765
8748
|
/** @export */ qb: _wgpuQueueWriteTexture,
|
|
8766
8749
|
/** @export */ ya: _wgpuRenderPassEncoderDraw,
|
|
@@ -8836,5 +8819,5 @@ if (runtimeInitialized) {
|
|
|
8836
8819
|
}
|
|
8837
8820
|
|
|
8838
8821
|
// Export using a UMD style export, or ES6 exports if selected
|
|
8839
|
-
export default ModuleFactory;
|
|
8822
|
+
globalThis.ModuleFactory = ModuleFactory; globalThis.custom_dbg = console.warn.bind(console); export default ModuleFactory;
|
|
8840
8823
|
|
|
Binary file
|