Skip to content

Instantly share code, notes, and snippets.

@jahpd
Last active June 29, 2017 16:07
Show Gist options
  • Save jahpd/f09b00cd253a3283a5edc423a27c1a3d to your computer and use it in GitHub Desktop.
Save jahpd/f09b00cd253a3283a5edc423a27c1a3d to your computer and use it in GitHub Desktop.
_pos = []
@setup = ->
@createCanvas 480, 360
@frameRate 0.5
_pos = if i is 0 then @random 480 else @random 255 for i in [0,1]
@draw = ->
for i in [0..19]
colors = @random 255 for i in [0..3]
pos = (if i is 0 then @random @width else @random 255) for i in [0,1]
@stroke colors[0], colors[1], colors[2], colors[3]
@fill 0, 0, 0, @random(255)
@bezier(pos[0],pos[1],@random @width, @random @heigth, @random @width, @random @heigth, _pos[0], _pos[1])
_pos = pos
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment