From 2ec570d291f05f07862d901ec39222f2f44e9851 Mon Sep 17 00:00:00 2001 From: Garrett Finucane Date: Sun, 27 Jul 2014 08:27:15 -0400 Subject: [PATCH] fixed the jagged rendering by fixing the stupid constant --- js/Block.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/js/Block.js b/js/Block.js index 256417b..040880e 100644 --- a/js/Block.js +++ b/js/Block.js @@ -94,7 +94,8 @@ function Block(fallingLane, color, iter, distFromHex, settled) { } this.width = 2 * this.distFromHex / Math.sqrt(3); - this.widthWide = this.width + this.height + 3; + this.widthWide = 2 * (this.distFromHex + this.height) / Math.sqrt(3); + //this.widthWide = this.width + this.height + 3; var p1; var p2; var p3; @@ -137,7 +138,7 @@ function Block(fallingLane, color, iter, distFromHex, settled) { ctx.lineTo(baseX + p2.x, baseY + p2.y); ctx.lineTo(baseX + p3.x, baseY + p3.y); ctx.lineTo(baseX + p4.x, baseY + p4.y); - ctx.lineTo(baseX + p1.x, baseY + p1.y); + //ctx.lineTo(baseX + p1.x, baseY + p1.y); ctx.closePath(); ctx.fill();