标签: javascript animation three.js rotation mobile-devices
参考类似的问题here,我试图让智能手机/平板电脑上的对象旋转。由于我使用mouseDown方法获得它,因此这不适用于移动设备上的触摸。对此有什么解决方案吗?
mouseDown
答案 0 :(得分:2)
尝试touchstart和touchend作为触摸屏的事件监听器。
touchstart
touchend
window.addEventListener("touchstart", handleStart, false); window.addEventListener("touchend", handleEnd, false);