marcmll / next-snake

Minimal Snake browser game, built using Next.js
https://next-snake.vercel.app
60 stars 14 forks source link

Add touch gestures for mobile #13

Open Jak2k opened 1 year ago

Jak2k commented 1 year ago

https://www.npmjs.com/package/use-swipe-hook

SgtPooki commented 11 months ago

support added on my fork via changes at https://github.com/SgtPooki/next-snake/commit/e0e7a915856c36685d0341491d7f3273df94d281

SgtPooki commented 11 months ago

some additional changes were required to actually get touch working (and not moving the screen around): https://github.com/SgtPooki/next-snake/commit/7ef2cc8300c780d73236f21a6b8f10c6b3139e5b

works on my phone and chrome device emulation, but window scroll is broken :) calling it good for now