Move the square to get it moving (it's using Hammer JS to recognize the touch).
Distance moved horizontaly:
Distance moved verticaly: