Skip to content

Instantly share code, notes, and snippets.

@gabrielflorit
Last active October 23, 2019 02:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielflorit/c386e79f1af0906a2113dc89df634378 to your computer and use it in GitHub Desktop.
Save gabrielflorit/c386e79f1af0906a2113dc89df634378 to your computer and use it in GitHub Desktop.
SCRIPT-8
// title: color swapping
init = state => {
state.counter = 0
}
update = state => {
state.counter++
}
draw = state => {
clear()
colorSwap(5, state.counter % 7)
rectFill(32, 32, 64, 64, 5)
}
{
"iframeVersion": "0.1.260",
"lines": [
16,
0,
0,
0,
0,
0,
0,
0
]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment