Fix redrawing, fiddle with timing
This commit is contained in:
parent
2d404587d9
commit
32335c5305
@ -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…
Reference in New Issue
Block a user