@techstark/opencv-js 4.8.0-release.2 → 4.8.0-release.3
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/README.md +11 -2
- package/dist/opencv.js +1 -1
- package/dist/opencv.js.patch +10 -8
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -30,8 +30,17 @@ TypeScript is supported (thanks to `mirada`).
|
|
|
30
30
|
|
|
31
31
|
- `npm install @techstark/opencv-js`
|
|
32
32
|
- or `yarn add @techstark/opencv-js`
|
|
33
|
-
- `
|
|
34
|
-
- or
|
|
33
|
+
- `const cv = await import("@techstark/opencv-js");`
|
|
34
|
+
- or wrap it in an async function like
|
|
35
|
+
|
|
36
|
+
```js
|
|
37
|
+
async function getOpenCv() {
|
|
38
|
+
const cv = await import("@techstark/opencv-js");
|
|
39
|
+
// for development
|
|
40
|
+
window.cv = cv;
|
|
41
|
+
return cv;
|
|
42
|
+
}
|
|
43
|
+
```
|
|
35
44
|
|
|
36
45
|
# Webpack Configuration (for browser usage)
|
|
37
46
|
|
package/dist/opencv.js
CHANGED
package/dist/opencv.js.patch
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
diff --git a/dist/opencv.js b/dist/opencv.js
|
|
2
|
-
index
|
|
2
|
+
index 6339212..5befe7a 100644
|
|
3
3
|
--- a/dist/opencv.js
|
|
4
4
|
+++ b/dist/opencv.js
|
|
5
|
-
@@ -
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
-Module={};
|
|
10
|
-
|
|
11
|
-
|
|
5
|
+
@@ -43,7 +43,7 @@ else if (typeof exports === 'object')
|
|
6
|
+
exports["cv"] = cv;
|
|
7
|
+
|
|
8
|
+
if (typeof Module === 'undefined')
|
|
9
|
+
- Module = {};
|
|
10
|
+
+ var Module = {};
|
|
11
|
+
return cv(Module);
|
|
12
|
+
}));
|
|
13
|
+
|
|
12
14
|
|