Added ENV for dead-code elimination in production mode

This commit is contained in:
Christoph Oberhofer
2016-02-25 07:20:51 +01:00
parent b7ffeec6db
commit 9cbfafe698
13 changed files with 286 additions and 124 deletions
+51
View File
@@ -0,0 +1,51 @@
module.exports = {
inputStream: {
name: "Live",
type: "LiveStream",
constraints: {
width: 640,
height: 480,
minAspectRatio: 0,
maxAspectRatio: 100,
facing: "environment" // or user
},
area: {
top: "0%",
right: "0%",
left: "0%",
bottom: "0%"
},
singleChannel: false // true: only the red color-channel is read
},
locate: true,
numOfWorkers: 0,
decoder: {
readers: [
'code_128_reader'
],
debug: {
drawBoundingBox: false,
showFrequency: false,
drawScanline: false,
showPattern: false,
}
},
locator: {
halfSample: true,
patchSize: "medium", // x-small, small, medium, large, x-large
debug: {
showCanvas: true,
showPatches: true,
showFoundPatches: false,
showSkeleton: false,
showLabels: false,
showPatchLabels: false,
showRemainingPatchLabels: false,
boxFromPatches: {
showTransformed: false,
showTransformedBox: false,
showBB: false
}
}
}
};
+12 -48
View File
@@ -1,48 +1,12 @@
export default {
inputStream: {
name: "Live",
type: "LiveStream",
constraints: {
width: 640,
height: 480,
minAspectRatio: 0,
maxAspectRatio: 100,
facing: "environment" // or user
},
area: {
top: "0%",
right: "0%",
left: "0%",
bottom: "0%"
},
singleChannel: false // true: only the red color-channel is read
},
debug: false,
locate: true,
numOfWorkers: 4,
decoder: {
drawBoundingBox: false,
showFrequency: false,
drawScanline: false,
showPattern: false,
readers: [
'code_128_reader'
]
},
locator: {
halfSample: true,
patchSize: "medium", // x-small, small, medium, large, x-large
showCanvas: false,
showPatches: false,
showFoundPatches: false,
showSkeleton: false,
showLabels: false,
showPatchLabels: false,
showRemainingPatchLabels: false,
boxFromPatches: {
showTransformed: false,
showTransformedBox: false,
showBB: false
}
}
};
let config;
console.log(ENV);
if(ENV.development){
config = require('./config.dev.js');
} else if (ENV.node) {
config = require('./config.node.js');
} else {
config = require('./config.prod.js');
}
export default config;
+25
View File
@@ -0,0 +1,25 @@
module.exports = {
inputStream: {
type: "ImageStream",
sequence: false,
size: 800,
area: {
top: "0%",
right: "0%",
left: "0%",
bottom: "0%"
},
singleChannel: false // true: only the red color-channel is read
},
locate: true,
numOfWorkers: 0,
decoder: {
readers: [
'code_128_reader'
]
},
locator: {
halfSample: true,
patchSize: "medium", // x-small, small, medium, large, x-large
}
};
+31
View File
@@ -0,0 +1,31 @@
module.exports = {
inputStream: {
name: "Live",
type: "LiveStream",
constraints: {
width: 640,
height: 480,
minAspectRatio: 0,
maxAspectRatio: 100,
facing: "environment" // or user
},
area: {
top: "0%",
right: "0%",
left: "0%",
bottom: "0%"
},
singleChannel: false // true: only the red color-channel is read
},
locate: true,
numOfWorkers: 4,
decoder: {
readers: [
'code_128_reader'
]
},
locator: {
halfSample: true,
patchSize: "medium", // x-small, small, medium, large, x-large
}
};