diff --git a/css/styles.css b/css/styles.css index df899e8..1c7892c 100644 --- a/css/styles.css +++ b/css/styles.css @@ -15,6 +15,7 @@ body{ top:50%; position: absolute; background: #555; + background:rgba(0.2,0.2,0.2,.70); } @@ -23,6 +24,7 @@ body{ position: absolute; background: #2f2f2f; left:120px; + background:rgba(.9,.9,.9,.50); } @@ -33,12 +35,14 @@ body{ left:0px; width:120px; text-align: center; + background:rgba(.9,.9,.9,.80); } #leftInfo{ height:100%; width:120px; margin:0 auto; + background:rgba(.9,.9,.9,.80); } #hold{ @@ -47,6 +51,7 @@ body{ height:360px; background: #2f2f2f; margin:10px auto; + background:rgba(.9,.9,.9,.80); } #gameOver{ @@ -79,19 +84,22 @@ body{ top:0; right:0; text-align: center; + background:rgba(.9,.9,.9,.70); } #info{ width:120px; margin:0 auto; + background:rgba(.9,.9,.9,.70); } #preview{ width:80px; height:360px; top:0px; - background: #2f2f2f; + background: #ffffff; margin:10px auto; + background:rgba(.9,.9,.9,.90); } @@ -99,31 +107,37 @@ body{ color:#fff; font-size:18px; margin:10px 0; + background:rgba(.9,.9,.9,.70); } #level{ color:orange; font-size:32px; + background:rgba(.9,.9,.9,.70); } #scoreInfo{ color:#fff; font-size: 18px; margin-top:0; + background:rgba(.9,.9,.9,.70); } #score{ color:orange; font-family: 'Chalkboard SE'; + background:rgba(.9,.9,.9,.70); }#linesInfo{ color:#fff; font-size: 18px; margin-top:0; + background:rgba(.9,.9,.9,.70); } #lines{ color:orange; font-family: 'Chalkboard SE'; + background:rgba(.9,.9,.9,.70); } #rewardInfo{ color:yellow; diff --git a/dist/sound/Ab7maj.ogg b/dist/sound/Ab7maj.ogg new file mode 100644 index 0000000..2e53624 Binary files /dev/null and b/dist/sound/Ab7maj.ogg differ diff --git a/dist/sound/Db7min.ogg b/dist/sound/Db7min.ogg new file mode 100644 index 0000000..de71a39 Binary files /dev/null and b/dist/sound/Db7min.ogg differ diff --git a/dist/sound/Ds7dim.ogg b/dist/sound/Ds7dim.ogg new file mode 100644 index 0000000..feed000 Binary files /dev/null and b/dist/sound/Ds7dim.ogg differ diff --git a/dist/sound/Fs7min.ogg b/dist/sound/Fs7min.ogg new file mode 100644 index 0000000..a2e6370 Binary files /dev/null and b/dist/sound/Fs7min.ogg differ diff --git a/dist/tetrion.js b/dist/tetrion.js index 9058199..261f4a2 100644 --- a/dist/tetrion.js +++ b/dist/tetrion.js @@ -158,7 +158,35 @@ var tetrisCanvas = { if (value === 1){ var x = gsize *(shape.x + j); var y = gsize *(bottomY + i); //(shape.y + i); - drawBox(this.sceneContext,"rgba(255, 255, 255, 0.4)",x,y,gsize); + drawBox(this.sceneContext,"rgba(255, 255, 255, 0.2)",x,y,gsize); + } + } + } + }, + hexToRgb: function(hex) { + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; + }, + drawHintShape:function(shape){ + if (!shape){ + return; + } + var colorRGB = this.hexToRgb(shape.color); + var color = "rgba(" + colorRGB.r + "," + colorRGB.g + "," + colorRGB.b + "," + "0.4)"; + + var matrix = shape.matrix(); + var gsize = this.gridSize; + for(var i = 0;i -
+ + + +
diff --git a/src/canvas.js b/src/canvas.js index 2bf0917..b7e8f77 100644 --- a/src/canvas.js +++ b/src/canvas.js @@ -157,7 +157,35 @@ var tetrisCanvas = { if (value === 1){ var x = gsize *(shape.x + j); var y = gsize *(bottomY + i); //(shape.y + i); - drawBox(this.sceneContext,"rgba(255, 255, 255, 0.4)",x,y,gsize); + drawBox(this.sceneContext,"rgba(255, 255, 255, 0.2)",x,y,gsize); + } + } + } + }, + hexToRgb: function(hex) { + var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex); + return result ? { + r: parseInt(result[1], 16), + g: parseInt(result[2], 16), + b: parseInt(result[3], 16) + } : null; + }, + drawHintShape:function(shape){ + if (!shape){ + return; + } + var colorRGB = this.hexToRgb(shape.color); + var color = "rgba(" + colorRGB.r + "," + colorRGB.g + "," + colorRGB.b + "," + "0.4)"; + + var matrix = shape.matrix(); + var gsize = this.gridSize; + for(var i = 0;i