Browse Source

Fix redrawing, fiddle with timing

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

Loading…
Cancel
Save