PLAYCUBE PLAYCUBE - 7 months ago 78
Javascript Question

Three.js: Rotate object on mobile devices

Referring to a similar question here, I am trying to get an object rotated on smartphones/tablets. Since I got it with

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);