Permalink
Browse files

Add slow fade to black.

  • Loading branch information...
kevadsett committed Sep 13, 2016
1 parent 2275902 commit 26de34dacd32ec3b8d0638c0cb951506ea73ff57
Showing with 2 additions and 14 deletions.
  1. +2 −14 src/js/views/LevelContainerView.js
@@ -6,20 +6,8 @@ function LevelContainerView(model) {
LevelContainerView.prototype = {
draw: function(layer) {
if (layer !== "background") return;
var gradient;
if (window.glitchMode === "floor") {
gradient = ctx.createLinearGradient(0, 0, 0, canvas.height);
gradient.addColorStop(0, "rgb(241, 196, 15)");
gradient.addColorStop(0.25, "rgb(241, 196, 15)");
gradient.addColorStop(1, "rgb(211, 84, 0)");
} else {
gradient = ctx.createLinearGradient(0, 0, 0, canvas.height);
gradient.addColorStop(0, "rgb(26, 188, 156)");
gradient.addColorStop(0.25, "rgb(26, 188, 156)");
gradient.addColorStop(1, "rgb(41, 128, 185)");
}
ctx.fillStyle = gradient;
ctx.globalAlpha = 0;
ctx.fillStyle = "black";
ctx.globalAlpha = 0.01;
ctx.fillRect(0, 0, canvas.width, canvas.height);
},
destroy: function() {

0 comments on commit 26de34d

Please sign in to comment.