Y
Hacker News
new
|
ask
|
show
|
jobs
by
brugidou
4470 days ago
how do you play with a phone? i can only swipe tiles but I cant change dimension. there need to be some sort of "two finger swipe" for WASD keys.
1 comments
dbaupp
4470 days 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?
link
matthewmacleod
4470 days ago
You 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/To...
link
dbaupp
4470 days ago
Very cool, thanks; I've added two-finger swipe for the extra two dimensions.
link
truebosko
4470 days ago
You may want to check out Hammer.js (
http://eightmedia.github.io/hammer.js/
)
link
iLoch
4470 days ago
You could separate the screen. Top half/bottom half.
link