Created
February 9, 2014 14:51
-
-
Save ddrone/8900151 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 | |
import Mouse | |
fpsCount = 35 | |
delta = fps fpsCount | |
time = foldp (+) 0.0 delta | |
timeSeconds = (\ x -> x / 1000.0) <~ time | |
black = rgb 0 0 0 | |
display (w, h) (x, y) t = | |
container w h middle <| collage w h | |
[ rect 50 50 |> | |
filled black |> | |
move (toFloat (x - w `div` 2), toFloat (-y + h `div` 2)) |> | |
rotate t ] | |
main = display <~ Window.dimensions ~ Mouse.position ~ timeSeconds |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment