Browse Source

Fix redrawing, fiddle with timing

main
Luke Murphy 5 years ago
parent
commit
32335c5305
No known key found for this signature in database GPG Key ID: 5E2EF5A63E3718CC
  1. 6
      voicegardens/static/voicegardens.js

6
voicegardens/static/voicegardens.js

@ -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);
}

Loading…
Cancel
Save