Skip to content

Commit

Permalink
update opencv
Browse files Browse the repository at this point in the history
  • Loading branch information
jm12138 committed Jul 8, 2024
1 parent e17a080 commit 2d4a798
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion opencv2esm.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function processFile(data) {
await writeFile(wasmFilePath, binaryData);
console.log('WASM file saved as opencv.wasm');

let updatedData = data.replace(wasmDataUriMatch[0], 'wasmBinaryFile = "./opencv.wasm"');
let updatedData = data.replace(wasmDataUriMatch[0], 'wasmBinaryFile = "opencv.wasm"');

const moduleWrapStart = "(function(root,factory){if(typeof define==='function'&&define.amd){define(function(){return(root.cv=factory());});}else if(typeof module==='object'&&module.exports){module.exports=factory();}else if(typeof window==='object'){root.cv=factory();}else if(typeof importScripts==='function'){root.cv=factory();}else{root.cv=factory();}}(this,function(){";
const moduleWrapEnd = ";if(typeof exports==='object'&&typeof module==='object')\nmodule.exports=cv;else if(typeof define==='function'&&define['amd'])\ndefine([],function(){return cv;});else if(typeof exports==='object')\nexports[\"cv\"]=cv;if(typeof Module==='undefined')\nModule={};return cv(Module);}));";
Expand Down
2 changes: 1 addition & 1 deletion src/opencv.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -759,7 +759,7 @@ var cv = (function () {
? filename.startsWith(dataURIPrefix)
: filename.indexOf(dataURIPrefix) === 0;
}
var wasmBinaryFile = "./opencv.wasm";
var wasmBinaryFile = "opencv.wasm";
if (!isDataURI(wasmBinaryFile)) {
wasmBinaryFile = locateFile(wasmBinaryFile);
}
Expand Down

0 comments on commit 2d4a798

Please sign in to comment.