Fix redrawing, fiddle with timing

This commit is contained in:
Luke Murphy 2020-02-01 11:59:20 +01:00
parent 2d404587d9
commit 32335c5305
No known key found for this signature in database
GPG Key ID: 5E2EF5A63E3718CC

View File

@ -337,7 +337,7 @@ function draw() {
newSoundJustRecorded = false;
}
if (millis() >= 6000 + timer) {
if (millis() >= 1000 + timer) {
secondTick = true;
timer = millis();
}
@ -352,7 +352,7 @@ function draw() {
setTimeout(function() {
shape.destX = random(canvasWidth);
shape.destY = random(canvasHeight);
}, random(100, 1000));
}, random(100, 3000));
}
if (shape.collide(shapes) === true) {
@ -375,5 +375,5 @@ function windowResized() {
/**
* Canvas re-draw handling.
**/
resizeCanvas(canvasWidth, canvasHeight);
resizeCanvas(windowWidth, windowHeight);
}