Created
May 17, 2014 02:42
-
-
Save levjj/5ae33513d039720762e0 to your computer and use it in GitHub Desktop.
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
import Window | |
tick : Signal Float | |
tick = (((+) 100) . toFloat . ((flip mod) 100)) <~ count (fps 25) | |
shape : Float -> Form | |
shape i = ngon 5 20 | |
|> filled (hsva (i / 16) 0.5 1.0 1.0) | |
|> rotate (64 / i) | |
|> scale (i / 10) | |
scene : Float -> [Form] | |
scene i = if i < 4 then [] | |
else [shape i] ++ scene (i / 2) | |
main : Signal Element | |
main = let dims = Window.dimensions | |
in collage <~ (fst <~ dims) ~ (snd <~ dims) ~ (scene <~ tick) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment