Permalink
Browse files

dark chat

  • Loading branch information...
1 parent 5c54e45 commit 46a948810375a8d97ed6be23c65de513fa471909 @eminaz committed Jul 21, 2013
@@ -28,6 +28,7 @@ video {
#canvas-B {
/* position: fixed;*/
+ display: inline;
}
#canvas-A2 {
@@ -61,6 +61,7 @@ var App = {
// 'resize'
);
+/*
v2 = new VideoSquarer('monitor', 'canvas-A2', 'canvas-B2');
_.bindAll(v2,
'gotStream',
@@ -69,6 +70,8 @@ var App = {
'render'
// 'resize'
);
+*/
+
},
addSound: function(fileName) {
@@ -170,7 +173,7 @@ VideoSquarer.prototype.animLoop = function() {
this.render();
this.myReq = window.requestAnimationFrame(this.animLoop, this);
-},
+}
VideoSquarer.prototype.render = function() {
@@ -286,13 +289,21 @@ VideoSquarer.prototype.render = function() {
for(var y = 0; y < grid.length; ++y) {
for(var x = 0; x < grid[y].length; ++x) {
var percent = grid[y][x] / this.cell.pixels;
+
+
+ //hack
+ //percent=0.2;
+
this.colorBox((grid[y].length - x) * this.cell.drawWidth, y * this.cell.drawHeight, App.colors[y][x], percent);
this.playSound(App.sounds[y][x], percent);
}
}
this.contextA.globalAlpha = 1;
this.contextB.globalAlpha = 1;
+
+ //hack
+ this.contextB.globalAlpha = 0;
}
VideoSquarer.prototype.colorBox = function(x, y, color, opacity) {
Oops, something went wrong.

0 comments on commit 46a9488

Please sign in to comment.