Skip to content

Commit

Permalink
Revert "update"
Browse files Browse the repository at this point in the history
This reverts commit b4703a3.
  • Loading branch information
jm12138 committed Jul 8, 2024
1 parent b4703a3 commit e17a080
Show file tree
Hide file tree
Showing 8 changed files with 4,626 additions and 74,020 deletions.
36,370 changes: 4,560 additions & 31,810 deletions dist/webai.min.js

Large diffs are not rendered by default.

4,519 changes: 63 additions & 4,456 deletions docs/index.js

Large diffs are not rendered by default.

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
41 changes: 0 additions & 41 deletions ort2esm.js

This file was deleted.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@
"dev": "vite",
"build": "vite build",
"build:doc": "jsdoc -c jsdoc.json",
"build:ort": "node ort2esm.js",
"build:opencv": "node opencv2esm.js",
"build:html": "vite build --config vite.config.html.js",
"preview": "vite preview --config vite.config.html.js"
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
Loading

0 comments on commit e17a080

Please sign in to comment.