on master help sign in
Fix colors
commit96bdb40a6d41c4cd0edda26202333b7e0fa8d739 authorEvan Czaplicki <info@elm-lang.org> dateMon 25 Jun 2012, 06:56 (14 years ago) parentb4fa5c2
1 file changed+11−5
Examples/elm-yesod/elm_source/mouse.elm+11−5
Examples/elm-yesod/elm_source/mouse.elm+11−5
@@ -1,9 +1,15 @@
1−niceBlue = rgb 0 (1/3) (2/3)
2−clearGreen = rgba (1/9) (8/9) (3/9) (1/2)
1+
2+-- Move your mouse around above the canvas!
3+
4+import Signal.Mouse (position)
5+import Signal.Window (dimensions)
6+
7+myBlue = rgb 0 85 170
8+myGreen = rgba 28 267 85 (1/2)
39
410scene (x,y) (w,h) =
5− collage w h [ filled niceBlue . rotate ((x+y)/1000) $ ngon 4 100 (200,200)
6− , filled clearGreen $ ngon 5 30 (x,y)
11+ collage w h [ filled myBlue . rotate ((x+y)/1000) $ ngon 4 100 (200,200)
12+ , filled myGreen $ ngon 5 30 (x,y)
713 ]
814
9−main = lift2 scene Mouse.position Window.dimensions
15+main = lift2 scene position dimensions