This commit is contained in:
Michael Yang 2014-05-17 17:19:23 -04:00
parent 0503349d92
commit 86c73baa75
2 changed files with 3 additions and 3 deletions

View file

@ -16,7 +16,7 @@ function Block(lane, color, distFromHex, settled) {
this.distFromHex = distFromHex;
}
else {
this.distFromHex = 470;
this.distFromHex = 300;
}
this.draw = function() {
this.width = 2 * this.distFromHex / Math.sqrt(3);
@ -110,7 +110,7 @@ var Clock = function(sideLength) {
block.angle = block.angle - steps * 60;
});
});
this.angle = this.angle + steps * 60;
};

View file

@ -33,7 +33,7 @@ function render() {
if(now - lastGen > nextGen) {
blocks.push(new Block(randInt(0, 6), colors[randInt(0, colors.length)]));
lastGen = Date.now();
nextGen = randInt(100, 200);
nextGen = randInt(500, 1500);
}
ctx.clearRect(0, 0, canvas.width, canvas.height);
drawPolygon(canvas.width / 2, canvas.height / 2, 6, canvas.width / 2, 30, hexagonBackgroundColor);