Created
May 31, 2017 02:10
-
-
Save albertochiwas/b1c4e6fb3e16e22b7ffa7d8ac4dee04f to your computer and use it in GitHub Desktop.
Ejemplo final curso Live Coding UACH Mayo 2017
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(2); | |
var c1 = color(255, 0, 0); | |
var c2 = color(48, 60, 199); | |
var c = c1; | |
var ang = 1; | |
var mouseClicked = function() { | |
if ( c===c1 ) { | |
c = c2; | |
} else { | |
c = c1; | |
} | |
}; | |
var draw = function() { | |
background(c); | |
if ( ang < 45 ) { | |
ang++; | |
} else { | |
av.rotate(2,1); | |
} | |
av.setAngle(1, ang); | |
av.draw(mouseX,mouseY); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment