Three.js:在移动设备上旋转对象

时间:2016-09-12 20:55:23

标签: javascript animation three.js rotation mobile-devices

参考类似的问题here,我试图让智能手机/平板电脑上的对象旋转。由于我使用mouseDown方法获得它,因此这不适用于移动设备上的触摸。对此有什么解决方案吗?

1 个答案:

答案 0 :(得分:2)

尝试touchstarttouchend作为触摸屏的事件监听器。

window.addEventListener("touchstart", handleStart, false);
window.addEventListener("touchend", handleEnd, false);
相关问题