Permalink
Browse files

cleanup

  • Loading branch information...
1 parent 5bcf8af commit 0706b39b19e63c10c5e236719c320a10138ea565 @nelsonz nelsonz committed Sep 2, 2012
View
@@ -1,17 +0,0 @@
-<html>
- <input id="brighter" type="button" value="brighter" onclick="changeVideo('brighter',1);" />
- <input id="darker" type="button" value="darker" onclick="changeVideo('brighter',-1);" />
- <input id="morered" type="button" value="More Red" onclick="changeVideo('red',1)" />
- <input id="lessred" type="button" value="Less Red" onclick="changeVideo('red',-1);" />
- <input id="moreblue" type="button" value="More Green" onclick="changeVideo('green',1);" />
- <input id="lessblue" type="button" value="Less Green" onclick="changeVideo('green',-1);" />
- <input id="moreblue" type="button" value="More Blue" onclick="changeVideo('blue',1);" />
- <input id="lessblue" type="button" value="Less Blue" onclick="changeVideo('blue',-1);" />
- <script src="/socket.io/socket.io.js"></script>
- <script>
- var socket = io.connect('http://localhost:8000');
- socket.emit('my other event', { my: 'data' });
- function changeVideo(color,sign) {
- socket.emit("colorchange",{'color':color,'sign':sign});
- }
- </script>
File renamed without changes.
View
@@ -1,33 +0,0 @@
-var express = require('express'),
- fs = require('fs'),
- app = express(),
- server = require('http').createServer(app),
- io = require('socket.io').listen(server),
- clients = [];
-
-server.listen(8000);
-
-app.get('/', function(req, res) {
- fs.readFile(__dirname + '/index.html', function (err, data) {
- if (err) {
- console.log(err)
- }
- else {
- res.end(data);
- }
- });
-});
-
-app.post('/hub', function(req, res) {
- console.log(req);
- var name,
- IP;
- for (var i=0; i<clients.length; i++) {
- client[i].emit('new server', {name: name, IP: IP});
- }
-});
-
-io.sockets.on('connection', function(socket) {
- socket.emit('welcome');
- clients.push(socket);
-});
View
@@ -1,68 +0,0 @@
- var drawTimeout = null;
- document.addEventListener('DOMContentLoaded', function(){
- var v = document.getElementById('v');
- var canvas = document.getElementById('c');
- var context = canvas.getContext('2d');
- var back = document.createElement('canvas');
- var backcontext = back.getContext('2d');
- var cw,ch;
-
- v.addEventListener('play', function(){
- cw = v.clientWidth;
- ch = v.clientHeight;
- canvas.width = cw;
- canvas.height = ch;
- back.width = cw;
- back.height = ch;
- draw(v,context,backcontext,cw,ch,1);
- },false);
-
-},false);
-
-function draw(v,c,bc,w,h,value) {
- if(v.paused || v.ended) return false;
- // First, draw it into the backing canvas
- bc.drawImage(v,0,0,w,h);
- // Grab the pixel data from the backing canvas
- var idata = bc.getImageData(0,0,w,h);
- var data = idata.data;
- // Loop through the pixels, turning them grayscale
- for(var i = 0; i < data.length; i+=4) {
- var r = data[i];
- var g = data[i+1];
- var b = data[i+2];
- var brightness = (3*r+4*g+b)>>>3;
- data[i] = r * vidData[0] * vidData[1];
- data[i+1] = g * vidData[0] * vidData[2];
- data[i+2] = b * vidData[0] * vidData[3];
- }
- idata.data = data;
- // Draw the pixels onto the visible canvas
- c.putImageData(idata,0,0);
- // Start over!
- drawTimeout = setTimeout(function(){ draw(v,c,bc,w,h,value); }, 0);
-}
-
-function changeVideo(attribute,direction) {
- vidData[attribute] += direction * .25
-}
-var socket = io.connect('http://dev.vaishaal.com:8000');
-socket.on('brighter',function(data) {
- console.log(data);
- changeVideo(0,data);
-})
-socket.on('red',function(data) {
- changeVideo(1,data);
-})
-socket.on('blue',function(data) {
- changeVideo(3,data);
-})
-socket.on('green',function(data) {
-
- changeVideo(2,data);
-})
-
-function clear() {
- clearTimeout(drawTimeout);
-}
-
View
@@ -1,17 +0,0 @@
-<html>
- <input id="brighter" type="button" value="brighter" onclick="changeVideo('brighter',1);" />
- <input id="darker" type="button" value="darker" onclick="changeVideo('brighter',-1);" />
- <input id="morered" type="button" value="More Red" onclick="changeVideo('red',1)" />
- <input id="lessred" type="button" value="Less Red" onclick="changeVideo('red',-1);" />
- <input id="moreblue" type="button" value="More Green" onclick="changeVideo('green',1);" />
- <input id="lessblue" type="button" value="Less Green" onclick="changeVideo('green',-1);" />
- <input id="moreblue" type="button" value="More Blue" onclick="changeVideo('blue',1);" />
- <input id="lessblue" type="button" value="Less Blue" onclick="changeVideo('blue',-1);" />
- <script src="/socket.io/socket.io.js"></script>
- <script>
- var socket = io.connect('http://localhost:8000');
- socket.emit('my other event', { my: 'data' });
- function changeVideo(color,sign) {
- socket.emit("colorchange",{'color':color,'sign':sign});
- }
- </script>
View
@@ -1,7 +0,0 @@
-<script src="/socket.io/socket.io.js"></script>
-<script>
- var socket = io.connect('localhost');
- socket.on('welcome', function (data) {
- console.log(data);
- });
-</script>
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
No changes.
View
@@ -1,133 +0,0 @@
-<html>
- <head>
- <title>HTML5 Photo Booth</title>
- <style>
- body {
- background: black;
-}
-
-#c {
- position: absolute;
- top: 50%
- left: 50%
- margin: -180px 0 0 -240px;
- }
-
-
-#vid {
- position: absolute;
- top: 50%;
- left: 50%;
- margin: -180px 0 0 -240px;
-
-}
-
-
-
-</style>
- </head>
- <body>
- <h2>HTML5 Photo Booth</h2>
-
- <video id="v">
- </video>
-
- <script src="/socket.io/socket.io.js"></script>
- <script>
- navigator.getUserMedia = navigator.getUserMedia || navigator.webkitGetUserMedia ||
- navigator.mozGetUserMedia || navigator.msGetUserMedia;
- window.URL = window.URL || window.webkitURL;
-
- navigator.getUserMedia({video: true}, function(localMediaStream) {
- var video = document.getElementById("v");
- video.autoplay = true;
- video.src = window.URL.createObjectURL(localMediaStream);
- }, function(error) {
- console.log(error);
- });
- </script>
- <script>
- var vidData = [1, 1, 1, 1];
- var drawTimeout = null;
- document.addEventListener('DOMContentLoaded', function(){
- var v = document.getElementById('v');
- var canvas = document.getElementById('c');
- var context = canvas.getContext('2d');
- var back = document.createElement('canvas');
- var backcontext = back.getContext('2d');
- var cw,ch;
-
- v.addEventListener('play', function(){
- cw = v.clientWidth;
- ch = v.clientHeight;
- canvas.width = cw;
- canvas.height = ch;
- back.width = cw;
- back.height = ch;
- draw(v,context,backcontext,cw,ch,1);
- },false);
-
-},false);
-
-function draw(v,c,bc,w,h,value) {
- if(v.paused || v.ended) return false;
- // First, draw it into the backing canvas
- bc.drawImage(v,0,0,w,h);
- // Grab the pixel data from the backing canvas
- var idata = bc.getImageData(0,0,w,h);
- var data = idata.data;
- // Loop through the pixels, turning them grayscale
- for(var i = 0; i < data.length; i+=4) {
- var r = data[i];
- var g = data[i+1];
- var b = data[i+2];
- var brightness = (3*r+4*g+b)>>>3;
- data[i] = r * vidData[0] * vidData[1];
- data[i+1] = g * vidData[0] * vidData[2];
- data[i+2] = b * vidData[0] * vidData[3];
- }
- idata.data = data;
- // Draw the pixels onto the visible canvas
- c.putImageData(idata,0,0);
- // Start over!
- drawTimeout = setTimeout(function(){ draw(v,c,bc,w,h,value); }, 0);
-}
-
-function changeVideo(attribute,direction) {
- vidData[attribute] += direction * .5
-}
-var socket = io.connect('http://10.10.64.99:8000');
-socket.on('brighter',function(data) {
- console.log(data);
- changeVideo(0,data);
-})
-socket.on('red',function(data) {
- changeVideo(1,data);
-})
-socket.on('blue',function(data) {
- changeVideo(3,data);
-})
-socket.on('green',function(data) {
-
- changeVideo(2,data);
-})
-
-function clear() {
- clearTimeout(drawTimeout);
-}
-</script>
- <canvas id=c></canvas>
- <div>
- <input id="brighter" type="button" value="brighter" onclick="changeVideo(0,1);" />
- <input id="darker" type="button" value="darker" onclick="changeVideo(0,-1);" />
- <input id="morered" type="button" value="More Red" onclick="changeVideo(1,1);" />
- <input id="lessred" type="button" value="Less Red" onclick="changeVideo(1,-1);" />
- <input id="moreblue" type="button" value="More Green" onclick="changeVideo(2,1);" />
- <input id="lessblue" type="button" value="Less Green" onclick="changeVideo(2,-1);" />
- <input id="moreblue" type="button" value="More Blue" onclick="changeVideo(3,1);" />
- <input id="lessblue" type="button" value="Less Blue" onclick="changeVideo(3,-1);" />
-
-</div>
-</html>
-
-
View
@@ -1,21 +0,0 @@
-;; Object Intro-Workshop/
-;; SEMANTICDB Tags save file
-(semanticdb-project-database-file "Intro-Workshop/"
- :tables (list
- (semanticdb-table "video.js"
- :major-mode 'java-mode
- :tags 'nil
- :file "video.js"
- :pointmax 1
- )
- (semanticdb-table "complicated.js"
- :major-mode 'java-mode
- :tags 'nil
- :file "complicated.js"
- :pointmax 1897
- )
- )
- :file "semantic.cache"
- :semantic-tag-version "2.0beta3"
- :semanticdb-version "2.0beta3"
- )
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
View
@@ -1,25 +0,0 @@
-button.punch {
- background: none repeat scroll 0 0 #4162A8;
- border-color: #38538C #1F2D4D #151E33;
- border-radius: 4px 4px 4px 4px;
- border-style: solid;
- border-width: 1px;
- box-shadow: 0 1px 10px 1px #5C8BEE inset, 0 1px 0 #1D2C4D, 0 6px 0 #1F3053, 0 8px 4px 1px #111111;
- color: #FFFFFF;
- font: bold 20px/1 "helvetica neue",helvetica,arial,sans-serif;
- margin-bottom: 10px;
- padding: 10px 0 12px;
- text-align: center;
- text-shadow: 0 -1px 1px #1E2D4D;
- width: 150px;
-}
-
-button.punch:hover {
- box-shadow: 0 0 20px 1px #87ADFF inset, 0 1px 0 #1D2C4D, 0 6px 0 #1F3053, 0 8px 4px 1px #111111;
- cursor: pointer;
-}
-
-button.punch:active {
- box-shadow: 0 1px 10px 1px #5C8BEE inset, 0 1px 0 #1D2C4D, 0 2px 0 #1F3053, 0 4px 3px 0 #111111;
- margin-top: 58px;
-}

0 comments on commit 0706b39

Please sign in to comment.