3 ms·
I couldn't work out how to implement the extra 2 movement dimensions on a phone. Does JS support detecting 2 finger swipes (or something similar) in a sane way?
by dbaupp 13y ago
I couldn't work out how to implement the extra 2 movement dimensions on a phone. Does JS support detecting 2 finger swipes (or something similar) in a sane way?
- iLoch 13y agoYou could separate the screen. Top half/bottom half.
- matthewmacleod 13y agoYou can certainly grab the number of touches in an event - two-finger swipe might be interesting. MDN has quite a few examples: https://developer.mozilla.org/en-US/docs/Web/Guide/Events/Touch_events https://developer.mozilla.org/en-US/docs/Web/Guide/Events/To...
- dbaupp 13y agoVery cool, thanks; I've added two-finger swipe for the extra two dimensions.
- truebosko 13y agoYou may want to check out Hammer.js (http://eightmedia.github.io/hammer.js/ http://eightmedia.github.io/hammer.js/)