Last active
September 25, 2017 06:31
-
-
Save bevchou/6cc1f087bbbc2a57f5400b7488dcc711 to your computer and use it in GitHub Desktop.
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
//all the boolean values started as false at the beginning of the sketch | |
//if slider reaches the area after the stop angle | |
if (angle > stopAngle || angle < 0) { | |
//reset arc rotation | |
angle = 0; | |
//define when to change color | |
//if hasn't passed the stop angle before | |
if (!passedStop) { | |
//flip boolean value | |
changeCol = !changeCol; | |
passedStop = !passedStop; | |
} | |
} else { | |
passedStop = false; | |
} | |
//change color | |
if (changeCol) { | |
h += 20; | |
//reset after changing color | |
passedStop = false; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment