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?
Try touchstart
and touchend
as the event listeners for touch screens.
window.addEventListener("touchstart", handleStart, false);
window.addEventListener("touchend", handleEnd, false);