Created
August 27, 2015 17:37
-
-
Save albertochiwas/82b4866f4b3179f7fbf5 to your computer and use it in GitHub Desktop.
Rotate each puppet joint randomly & pause with click mouse (to test constraints)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var av = new Avatar("squirrel"); | |
var pause = false; | |
var draw = function() { | |
background(99); | |
for (var i=0; i<10; i++) { | |
av.rotate(i,random(-9,9)); | |
} | |
av.draw(mouseX,mouseY); | |
}; | |
var mouseClicked = function() { | |
if (pause) { | |
loop(); | |
} else { | |
noLoop(); | |
} | |
pause = !pause; | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment