Last active
June 6, 2018 02:46
-
-
Save gabrielflorit/97a3948d2c0f243c055785815c8daeba 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
// title: Polystroke shutter | |
initialState = { | |
r: 0 | |
} | |
update = s => { | |
s.r += 1 | |
} | |
draw = s => { | |
clear() | |
const i = 16 * Math.sin(s.r * Math.PI / 180) | |
range(7).forEach(j => { | |
polyStroke( | |
[[16, 54 - i], [64, 64 - i], [16, 64 + i]], | |
j * 51 + s.r / i, | |
64 - i / 4, | |
64 + i / 4, | |
j | |
) | |
}) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment