Skip to content

Instantly share code, notes, and snippets.

@nekonesse
Created April 16, 2020 02:32
Show Gist options
  • Save nekonesse/d3f3760da4021b1fe7de4f56b620e515 to your computer and use it in GitHub Desktop.
Save nekonesse/d3f3760da4021b1fe7de4f56b620e515 to your computer and use it in GitHub Desktop.
SCRIPT-8
init = state => {
state.angle = 0 // the rotation angle
}
update = (state, input, elapsed) => {
state.angle = state.angle + elapsed / 5000000000
}
draw = (state) => {
clear()
const { angle } = state
const topLeft = [36, 36]
const topRight = [70, 36]
const bottomRight = [70, 91]
const bottomLeft = [36, 91]
const topleft = [35, 90]
const downleft = [18, 63]
const topright = [86, 63]
const downright = [86, 63]
polyStroke([topLeft, topRight,topright,downright, bottomRight, bottomLeft, topleft, downleft,], angle, 1)
}
{
"iframeVersion": "0.1.280",
"lines": [
21,
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