Skip to content

Commit

Permalink
loop music and show instruction.. :D
Browse files Browse the repository at this point in the history
  • Loading branch information
HilmiZul committed Oct 22, 2021
1 parent 157b4a6 commit 1e479e6
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion sketch.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ function setup() {
rec.onResult = showResult;
rec.start();

musik.play();
musik.loop();
}

function showResult() {
Expand Down Expand Up @@ -54,4 +54,12 @@ function draw() {
t[i].fallDown();
t[i].checkEdge();
}

if (rec.resultString === 'ball' || rec.resultString === 'triangle') {
// console.log('done.');
} else {
textAlign(CENTER);
textSize(30);
text('Say: "ball" or "triangle"', width/2, 100);
}
}

0 comments on commit 1e479e6

Please sign in to comment.