mirror of
https://github.com/serratus/quaggaJS.git
synced 2026-08-12 21:21:42 +08:00
version for node working
This commit is contained in:
Vendored
+696
-701
File diff suppressed because it is too large
Load Diff
Vendored
+3
-4
File diff suppressed because one or more lines are too long
@@ -1,10 +1,5 @@
|
|||||||
/* jshint undef: true, unused: true, browser:true, devel: true */
|
const CVUtils = require('../src/cv_utils'),
|
||||||
/* global define */
|
Ndarray = require("ndarray"),
|
||||||
|
|
||||||
define(["cv_utils"], function(CVUtils) {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var Ndarray = require("ndarray"),
|
|
||||||
Interp2D = require("ndarray-linear-interpolate").d2;
|
Interp2D = require("ndarray-linear-interpolate").d2;
|
||||||
|
|
||||||
var FrameGrabber = {};
|
var FrameGrabber = {};
|
||||||
@@ -97,5 +92,4 @@ define(["cv_utils"], function(CVUtils) {
|
|||||||
return _that;
|
return _that;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (FrameGrabber);
|
module.exports = FrameGrabber;
|
||||||
});
|
|
||||||
|
|||||||
+2
-9
@@ -1,10 +1,4 @@
|
|||||||
/* jshint undef: true, unused: true, browser:true, devel: true */
|
const GetPixels = require("get-pixels");
|
||||||
/* global define */
|
|
||||||
|
|
||||||
define(function() {
|
|
||||||
"use strict";
|
|
||||||
|
|
||||||
var GetPixels = require("get-pixels");
|
|
||||||
|
|
||||||
var InputStream = {};
|
var InputStream = {};
|
||||||
|
|
||||||
@@ -156,5 +150,4 @@ define(function() {
|
|||||||
return that;
|
return that;
|
||||||
};
|
};
|
||||||
|
|
||||||
return (InputStream);
|
module.exports = InputStream;
|
||||||
});
|
|
||||||
|
|||||||
+7798
-11
File diff suppressed because it is too large
Load Diff
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
"version": "0.7.0",
|
"version": "0.7.0",
|
||||||
"description": "An advanced barcode-scanner written in JavaScript",
|
"description": "An advanced barcode-scanner written in JavaScript",
|
||||||
"main": "lib/quagga.js",
|
"main": "lib/quagga.js",
|
||||||
"browser": "dist/quagga.js",
|
"browser": "dist/quagga.min.js",
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"async": "^1.4.2",
|
"async": "^1.4.2",
|
||||||
"babel-core": "^5.8.25",
|
"babel-core": "^5.8.25",
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ function initBuffers() {
|
|||||||
_skelImageWrapper = new ImageWrapper(_patchSize,
|
_skelImageWrapper = new ImageWrapper(_patchSize,
|
||||||
new Uint8Array(skeletonImageData, _patchSize.x * _patchSize.y * 3, _patchSize.x * _patchSize.y),
|
new Uint8Array(skeletonImageData, _patchSize.x * _patchSize.y * 3, _patchSize.x * _patchSize.y),
|
||||||
undefined, true);
|
undefined, true);
|
||||||
_skeletonizer = skeletonizer((typeof window !== 'undefined') ? window : self, {
|
_skeletonizer = skeletonizer((typeof window !== 'undefined') ? window : (typeof self !== 'undefined') ? self : global, {
|
||||||
size: _patchSize.x
|
size: _patchSize.x
|
||||||
}, skeletonImageData);
|
}, skeletonImageData);
|
||||||
|
|
||||||
|
|||||||
+2
-2
@@ -1,9 +1,7 @@
|
|||||||
import TypeDefs from './typedefs'; // eslint-disable-line no-unused-vars
|
import TypeDefs from './typedefs'; // eslint-disable-line no-unused-vars
|
||||||
import InputStream from './input_stream';
|
|
||||||
import ImageWrapper from './image_wrapper';
|
import ImageWrapper from './image_wrapper';
|
||||||
import BarcodeLocator from './barcode_locator';
|
import BarcodeLocator from './barcode_locator';
|
||||||
import BarcodeDecoder from './barcode_decoder';
|
import BarcodeDecoder from './barcode_decoder';
|
||||||
import FrameGrabber from './frame_grabber';
|
|
||||||
import Config from './config';
|
import Config from './config';
|
||||||
import Events from './events';
|
import Events from './events';
|
||||||
import CameraAccess from './camera_access';
|
import CameraAccess from './camera_access';
|
||||||
@@ -12,6 +10,8 @@ import {vec2} from 'gl-matrix';
|
|||||||
import ResultCollector from './result_collector';
|
import ResultCollector from './result_collector';
|
||||||
|
|
||||||
const merge = require('lodash/object/merge');
|
const merge = require('lodash/object/merge');
|
||||||
|
const InputStream = require('input_stream');
|
||||||
|
const FrameGrabber = require('frame_grabber');
|
||||||
|
|
||||||
var _inputStream,
|
var _inputStream,
|
||||||
_framegrabber,
|
_framegrabber,
|
||||||
|
|||||||
+7
-2
@@ -1,5 +1,6 @@
|
|||||||
var webpack = require('webpack'),
|
var webpack = require('webpack'),
|
||||||
MyUmdPlugin = require('./plugins/umd');
|
MyUmdPlugin = require('./plugins/umd'),
|
||||||
|
path = require('path');
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
entry: [
|
entry: [
|
||||||
@@ -14,7 +15,11 @@ module.exports = {
|
|||||||
}]
|
}]
|
||||||
},
|
},
|
||||||
resolve: {
|
resolve: {
|
||||||
extensions: ['', '.js', '.jsx']
|
extensions: ['', '.js', '.jsx'],
|
||||||
|
alias: {
|
||||||
|
'input_stream$': path.resolve(__dirname, 'src/input_stream'),
|
||||||
|
'frame_grabber$': path.resolve(__dirname, 'src/frame_grabber')
|
||||||
|
}
|
||||||
},
|
},
|
||||||
output: {
|
output: {
|
||||||
path: __dirname + '/dist',
|
path: __dirname + '/dist',
|
||||||
|
|||||||
@@ -0,0 +1,26 @@
|
|||||||
|
var webpack = require('webpack'),
|
||||||
|
path = require('path');
|
||||||
|
|
||||||
|
module.exports = require('./webpack.config.js');
|
||||||
|
|
||||||
|
console.log(path.resolve(__dirname, 'lib/input_stream'));
|
||||||
|
|
||||||
|
module.exports.resolve = {
|
||||||
|
extensions: ['', '.js', '.jsx'],
|
||||||
|
alias: {
|
||||||
|
'input_stream$': path.resolve(__dirname, 'lib/input_stream'),
|
||||||
|
'frame_grabber$': path.resolve(__dirname, 'lib/frame_grabber')
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports.externals = [
|
||||||
|
"get-pixels",
|
||||||
|
"gl-matrix",
|
||||||
|
"lodash",
|
||||||
|
"ndarray",
|
||||||
|
"ndarray-linear-interpolate"
|
||||||
|
];
|
||||||
|
module.exports.output.libraryTarget = "commonjs2";
|
||||||
|
module.exports.plugins = [];
|
||||||
|
module.exports.output.path = __dirname + '/lib';
|
||||||
|
module.exports.output.filename = 'quagga.js';
|
||||||
Reference in New Issue
Block a user