Advertisement
Guest User

Untitled

a guest
Jul 24th, 2014
187
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. import Mouse
  2. import Touch
  3. import Window
  4.  
  5. -- main = lift asText Mouse.position
  6. main = lift2 render Window.dimensions Touch.touches
  7.  
  8. render (wide,high) touches = container wide high (follow (getTouch touches)) thing
  9.  
  10. getTouch touches =
  11. let dots = map parseTouches touches
  12. in if isEmpty dots then (0,0) else head dots
  13.  
  14. parseTouches {x,y} = (x,y)
  15.  
  16. follow (posX,posY) = middleAt (absolute posX) (absolute posY)
  17.  
  18. thing = (width 300 (image 472 315 "/car.jpg"))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement