PLAYCUBE PLAYCUBE - 1 year ago 206
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?

Answer Source

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

window.addEventListener("touchstart", handleStart, false);
window.addEventListener("touchend", handleEnd, false);
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download