updated syntax in the mouse example

This commit is contained in:
Vladimir Bychkovsky 2013-02-07 22:18:44 -05:00
parent 33831dba83
commit e0d565005a

View file

@ -1,15 +1,15 @@
-- Move your mouse around above the canvas!
import Signal.Mouse (position)
import Signal.Window (dimensions)
import Mouse (position)
import Window (dimensions)
myBlue = rgb 0 85 170
myGreen = rgba 28 267 85 (1/2)
scene (x,y) (w,h) =
collage w h [ filled myBlue . rotate ((x+y)/1000) $ ngon 4 100 (200,200)
collage w h [ rotate (toFloat (x+y) / 1000) $ filled myBlue $ ngon 4 100 (200,200)
, filled myGreen $ ngon 5 30 (x,y)
]
main = lift2 scene position dimensions
main = lift2 scene Mouse.position Window.dimensions