From 9e246386c082631bb37796ea46d00aa017934094 Mon Sep 17 00:00:00 2001 From: sbrl Date: Wed, 8 Jun 2016 13:55:10 +0100 Subject: [PATCH] Offset hills ready for foreground content. --- renderer.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/renderer.js b/renderer.js index d1bd0ca..51de7f7 100644 --- a/renderer.js +++ b/renderer.js @@ -18,9 +18,10 @@ class Renderer this.hillSets.push(new HillSet(new Vector(2048, this.canvas.height * 0.9), 0.4, "rgb(102, 164, 90)")); this.hillSets.push(new HillSet(new Vector(2048, this.canvas.height * 0.6), 0.4, "rgb(43, 131, 35)")); this.hillSets.push(new HillSet(new Vector(2048, this.canvas.height * 0.2), 0.4, "rgb(50, 111, 8)")); - this.hillSets[0].pos = new Vector(0, this.canvas.height - this.hillSets[0].size.y); - this.hillSets[1].pos = new Vector(0, this.canvas.height - this.hillSets[1].size.y); - this.hillSets[2].pos = new Vector(0, this.canvas.height - this.hillSets[2].size.y); + var hillOffset = this.canvas.height * 0.1; + this.hillSets[0].pos = new Vector(0, this.canvas.height - this.hillSets[0].size.y - hillOffset); + this.hillSets[1].pos = new Vector(0, this.canvas.height - this.hillSets[1].size.y - hillOffset); + this.hillSets[2].pos = new Vector(0, this.canvas.height - this.hillSets[2].size.y - hillOffset); console.log(this.hillSets); }