Last active
April 16, 2020 01:35
-
-
Save nekonesse/7d31591275d5e48ccc24b15909252f70 to your computer and use it in GitHub Desktop.
SCRIPT-8
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
{} |
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
init = state => { | |
state.angle = 0 // the rotation angle | |
} | |
update = (state, input, elapsed) => { | |
// state.angle = state.angle + elapsed / 5 | |
} | |
draw = (state) => { | |
clear() | |
const { angle } = state | |
const halfSide = 8 * i / 2 | |
const topLeft = [64 - halfSide, 64 - halfSide] | |
const topRight = [64 + halfSide, 64 - halfSide] | |
const bottomRight = [64 + halfSide, 64 + halfSide] | |
const bottomLeft = [64 - halfSide, 64 + halfSide] | |
const middletop = [64 - halfSide, 64 - halfSide] | |
const middlebottom = [64, 64 ] | |
const color = i % 7 | |
polyStroke([topLeft, topRight, bottomRight, bottomLeft, middletop, middlebottom], angle, color) | |
} | |
} |
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
[] |
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
{ | |
"iframeVersion": "0.1.280", | |
"lines": [ | |
22, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0, | |
0 | |
] | |
} |
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
{} |
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
{} |
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
{} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment