diff --git a/image-worker.js b/image-worker.js new file mode 100644 index 0000000..1d42fbf --- /dev/null +++ b/image-worker.js @@ -0,0 +1,14 @@ +// message receiver +onmessage = function(event) { + var imageData = event.data.imageData, + dst = imageData.data; + + /* Image Processing goes here */ + for (var i=0; i < dst.length; i += 4) { + dst[i] += 70; + } + + postMessage({ + dstData: imageData + }); +}; diff --git a/index.html b/index.html new file mode 100644 index 0000000..7574d05 --- /dev/null +++ b/index.html @@ -0,0 +1,54 @@ + + + + WebCam Effects + + + + + + + + + + + \ No newline at end of file diff --git a/server.js b/server.js new file mode 100644 index 0000000..96ea025 --- /dev/null +++ b/server.js @@ -0,0 +1,20 @@ +var express = require("express"), + app = express(), + port = parseInt(process.env.PORT, 10) || 4567; + +app.get("/", function(req, res) { + res.redirect("/index.html"); +}); + +app.configure(function(){ + app.use(express.methodOverride()); + app.use(express.bodyParser()); + app.use(express.static(__dirname)); + app.use(express.errorHandler({ + dumpExceptions: true, + showStack: true + })); + app.use(app.router); +}); + +app.listen(port); \ No newline at end of file