Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Mouse
- import Touch
- import Window
- -- main = lift asText Mouse.position
- main = lift2 render Window.dimensions Touch.touches
- render (wide,high) touches = container wide high (follow (getTouch touches)) thing
- getTouch touches =
- let dots = map parseTouches touches
- in if isEmpty dots then (0,0) else head dots
- parseTouches {x,y} = (x,y)
- follow (posX,posY) = middleAt (absolute posX) (absolute posY)
- thing = (width 300 (image 472 315 "/car.jpg"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement