Skip to content

Instantly share code, notes, and snippets.

@dcalacci
Created June 1, 2013 14:01
Show Gist options
  • Save dcalacci/5690490 to your computer and use it in GitHub Desktop.
Save dcalacci/5690490 to your computer and use it in GitHub Desktop.
ball follows the mouse around
import Mouse
import Window
scene (x,y) (w,h) =
collage w h
[
circle 10 |> filled blue
|> move (x - toFloat w / 2, toFloat h / 2 - y)
]
main = scene <~ Mouse.position ~ Window.dimensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment