346ff6bb5d
see http://elm-lang.org/edit/examples/ index.elm remove "box" fns (obsolete) disambiguate "link" fns (Text or Graphics) tested against ghc-7.4.1, Elm-0.7.1.1, yesod-1.1.7.1, elm-yesod-0.1.3
13 lines
306 B
Elm
13 lines
306 B
Elm
|
|
-- Move your mouse around above the canvas!
|
|
|
|
myBlue = rgb 0 85 170
|
|
myGreen = rgba 28 267 85 0.5
|
|
|
|
scene (x,y) (w,h) =
|
|
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 Mouse.position Window.dimensions
|