Herbert Posted May 23, 2017 Share Posted May 23, 2017 hi guys, i have updated my pixi from 4.3.5 to 4.5.1, and I found there is a little change in touch event onTouchStart(e) { console.log(e.data.originalEvent.touches); // before originalEvent is TouchEvent so it has touches // new version originalEvent change to PointerEvent which does not have touches } somehow the originalEvent change from TouchEvent to PointerEvent which does not have touches, I used to detect touches to prevent multiple touches, so I have two question 1. what cause this change? 2. is there any other efficient way to limit the touches on my game, in my case, I only hope 1 touch exist at the same time? thanks to your help Quote Link to comment Share on other sites More sharing options...
OSUblake Posted May 26, 2017 Share Posted May 26, 2017 It looks like touches are back in 4.5.2... https://github.com/pixijs/pixi.js/issues/4040 And they added a isPrimary property to the event data, which would be true for the first touch. console.log(e.data.isPrimary); Herbert 1 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.