tywang2006 Posted April 6, 2017 Share Posted April 6, 2017 Is there any swip gesture in pixijs, thanks Quote Link to comment Share on other sites More sharing options...
Owlzy Posted April 6, 2017 Share Posted April 6, 2017 I've done it previously just by taking the distance and angle between touch down and touch up points. Quote Link to comment Share on other sites More sharing options...
alex_h Posted April 7, 2017 Share Posted April 7, 2017 I don't normally consider the angle but sometimes it's also useful to measure velocity and duration of the touch. Depends what you want to do with the swipe. It's common to want to do things like determine whether it is left to right or right to left, or up to down or down to up, which you can also do by comparing the start and end points. Quote Link to comment Share on other sites More sharing options...
tywang2006 Posted April 7, 2017 Author Share Posted April 7, 2017 4 hours ago, alex_h said: I don't normally consider the angle but sometimes it's also useful to measure velocity and duration of the touch. Depends what you want to do with the swipe. It's common to want to do things like determine whether it is left to right or right to left, or up to down or down to up, which you can also do by comparing the start and end points. I agree with you. Quote Link to comment Share on other sites More sharing options...
themoonrat Posted April 7, 2017 Share Posted April 7, 2017 I'd see if hammer.js provides what you require Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.