0

Referring to a similar question here, I am trying to get an object rotated on smartphones/tablets. Since I got it with mouseDown method, this won't apply to the touching on mobile devices. Is there any solution for that?

Community
  • 1
  • 1
PLAYCUBE
  • 795
  • 4
  • 14
  • 24
  • 1
    http://stackoverflow.com/questions/21009821/how-to-impliment-a-onmousedown-and-onmouseup-on-a-touch-screen-iphone – qballer Sep 12 '16 at 21:04

1 Answers1

3

Try touchstart and touchend as the event listeners for touch screens.

window.addEventListener("touchstart", handleStart, false);
window.addEventListener("touchend", handleEnd, false);
guardabrazo
  • 1,219
  • 1
  • 13
  • 26