Skip to content

Instantly share code, notes, and snippets.

@otavialabs
Last active December 19, 2015 17:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save otavialabs/5993198 to your computer and use it in GitHub Desktop.
Save otavialabs/5993198 to your computer and use it in GitHub Desktop.
Elm Hello World
textForm s pos = plainText s |> color (rgb 240 220 250) |> toForm |> move pos
render t = collage 200 200 [ textForm "OMG" ((sin t)*50,0) |> rotate (t*2)
, textForm "HELL!!!" (50,(sin t)*25) |> rotate (0-t/4) ]
main = lift render (foldp (\t acc -> acc + (t/500)) 0 (fps 25))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment