diff --git a/game-renderer.js b/game-renderer.js index 8b57292..fec7d21 100644 --- a/game-renderer.js +++ b/game-renderer.js @@ -94,7 +94,7 @@ function paintGridBorder(ctx) function paintGrid(ctx) { //Paint background. - ctx.fillStyle = "#e2ebf3"; + ctx.fillStyle = "rgb(211, 225, 237)"; ctx.fillRect(0, 0, CELL_WIDTH * GRID_SIZE, CELL_WIDTH * GRID_SIZE); paintGridBorder(ctx); @@ -124,7 +124,7 @@ function paintGrid(ctx) { var frac = (animateSpec.frame / ANIMATE_FRAMES); var back = new Color(.58, .41, .92, 1); - baseColor = animateSpec.before.baseColor.interpolateToString(back, frac); + baseColor = animateSpec.before.lightBaseColor.interpolateToString(back, frac); shadowColor = animateSpec.before.shadowColor.interpolateToString(back, frac); } else @@ -132,7 +132,7 @@ function paintGrid(ctx) } else if (p) { - baseColor = p.baseColor; + baseColor = p.lightBaseColor; shadowColor = p.shadowColor; } else //No animation nor is this player owned. @@ -175,7 +175,7 @@ function paintGrid(ctx) y -= offsetBounce; shadowColor = animateSpec.after.shadowColor; - baseColor = animateSpec.after.baseColor.deriveLumination(-(offsetBounce / DROP_HEIGHT) * .1); + baseColor = animateSpec.after.lightBaseColor.deriveLumination(-(offsetBounce / DROP_HEIGHT) * .1); ctx.fillStyle = shadowColor.rgbString(); ctx.fillRect(x, y + CELL_WIDTH, CELL_WIDTH, SHADOW_OFFSET); @@ -285,7 +285,7 @@ function paintUIBar(ctx) function paint(ctx) { - ctx.fillStyle = 'whitesmoke'; + ctx.fillStyle = '#e2ebf3'; //'whitesmoke'; ctx.fillRect(0, 0, canvasWidth, canvasHeight); //Move grid to viewport as said with the offsets, below the stats @@ -379,8 +379,8 @@ function centerOnPlayer(player, pos) var xOff = Math.floor(player.posX - (gameWidth / zoom - CELL_WIDTH) / 2); var yOff = Math.floor(player.posY - (gameHeight / zoom - CELL_WIDTH) / 2); var gridWidth = grid.size * CELL_WIDTH + BORDER_WIDTH * 2; - pos[0] = Math.max(Math.min(xOff, gridWidth + (BAR_WIDTH + 100) / zoom - gameWidth / zoom), 0); - pos[1] = Math.max(Math.min(yOff, gridWidth - gameHeight / zoom), 0); + pos[0] = xOff; //Math.max(Math.min(xOff, gridWidth + (BAR_WIDTH + 100) / zoom - gameWidth / zoom), 0); + pos[1] = yOff; //Math.max(Math.min(yOff, gridWidth - gameHeight / zoom), 0); } function getBounceOffset(frame) diff --git a/player.js b/player.js index c56ef51..8af1f81 100644 --- a/player.js +++ b/player.js @@ -373,8 +373,9 @@ function Player(grid, sdata) { var hue = Math.random(); this.baseColor = base = new Color(hue, .8, .5); } + this.lightBaseColor = base.deriveLumination(.1); this.shadowColor = base.deriveLumination(-.3); - this.tailColor = base.deriveLumination(.2).deriveAlpha(.5); + this.tailColor = base.deriveLumination(.3).deriveAlpha(.5); //Tail requires special handling. this.grid = grid; //Temporary diff --git a/public/bundle.js b/public/bundle.js index 51ba142..ba3ac66 100644 --- a/public/bundle.js +++ b/public/bundle.js @@ -887,7 +887,7 @@ function paintGridBorder(ctx) function paintGrid(ctx) { //Paint background. - ctx.fillStyle = "#e2ebf3"; + ctx.fillStyle = "rgb(211, 225, 237)"; ctx.fillRect(0, 0, CELL_WIDTH * GRID_SIZE, CELL_WIDTH * GRID_SIZE); paintGridBorder(ctx); @@ -917,7 +917,7 @@ function paintGrid(ctx) { var frac = (animateSpec.frame / ANIMATE_FRAMES); var back = new Color(.58, .41, .92, 1); - baseColor = animateSpec.before.baseColor.interpolateToString(back, frac); + baseColor = animateSpec.before.lightBaseColor.interpolateToString(back, frac); shadowColor = animateSpec.before.shadowColor.interpolateToString(back, frac); } else @@ -925,7 +925,7 @@ function paintGrid(ctx) } else if (p) { - baseColor = p.baseColor; + baseColor = p.lightBaseColor; shadowColor = p.shadowColor; } else //No animation nor is this player owned. @@ -968,7 +968,7 @@ function paintGrid(ctx) y -= offsetBounce; shadowColor = animateSpec.after.shadowColor; - baseColor = animateSpec.after.baseColor.deriveLumination(-(offsetBounce / DROP_HEIGHT) * .1); + baseColor = animateSpec.after.lightBaseColor.deriveLumination(-(offsetBounce / DROP_HEIGHT) * .1); ctx.fillStyle = shadowColor.rgbString(); ctx.fillRect(x, y + CELL_WIDTH, CELL_WIDTH, SHADOW_OFFSET); @@ -1078,7 +1078,7 @@ function paintUIBar(ctx) function paint(ctx) { - ctx.fillStyle = 'whitesmoke'; + ctx.fillStyle = '#e2ebf3'; //'whitesmoke'; ctx.fillRect(0, 0, canvasWidth, canvasHeight); //Move grid to viewport as said with the offsets, below the stats @@ -1172,8 +1172,8 @@ function centerOnPlayer(player, pos) var xOff = Math.floor(player.posX - (gameWidth / zoom - CELL_WIDTH) / 2); var yOff = Math.floor(player.posY - (gameHeight / zoom - CELL_WIDTH) / 2); var gridWidth = grid.size * CELL_WIDTH + BORDER_WIDTH * 2; - pos[0] = Math.max(Math.min(xOff, gridWidth + (BAR_WIDTH + 100) / zoom - gameWidth / zoom), 0); - pos[1] = Math.max(Math.min(yOff, gridWidth - gameHeight / zoom), 0); + pos[0] = xOff; //Math.max(Math.min(xOff, gridWidth + (BAR_WIDTH + 100) / zoom - gameWidth / zoom), 0); + pos[1] = yOff; //Math.max(Math.min(yOff, gridWidth - gameHeight / zoom), 0); } function getBounceOffset(frame) @@ -9453,8 +9453,9 @@ function Player(grid, sdata) { var hue = Math.random(); this.baseColor = base = new Color(hue, .8, .5); } + this.lightBaseColor = base.deriveLumination(.1); this.shadowColor = base.deriveLumination(-.3); - this.tailColor = base.deriveLumination(.2).deriveAlpha(.5); + this.tailColor = base.deriveLumination(.3).deriveAlpha(.5); //Tail requires special handling. this.grid = grid; //Temporary