uxebu / bonsai

BonsaiJS is a graphics library and renderer
http://bonsaijs.org
Other
1.97k stars 189 forks source link

TouchId with multi-touch bugged #59

Open pvdz opened 11 years ago

pvdz commented 11 years ago

My second finger gives me the same id as the first finger. So it's currently impossible to detect one finger events from the second.

padolsey commented 11 years ago

Are you prefixing your event-names with multi:? E.g.

stage.on('multi:pointerdown', function(e) {
  console.log(e.touchId);
});
pvdz commented 11 years ago

Yep

bs.on('multi:drag', this, ondrag=function(e){
  console.log("move:"+e.touchId)
  if (e.touchId == ...) {

The id's are not sequential or offset 0 either (weird long numbers, almost seems like timestamps, though consistent (=> static) in the same session).