hammerjs / hammer.js

A javascript library for multi-touch gestures :// You can touch this
http://hammerjs.github.io
MIT License
24.11k stars 2.63k forks source link

Question: Simultaneous Transforms on Large Multi-Touch Tables #58

Closed drchriscreed closed 11 years ago

drchriscreed commented 12 years ago

Hi,

Great job with hammer.js.

I'm doing some work with large multi-touch tables that support around 32 touch points and was wondering if there was a way that hammer.js could be used to allow transforms on multiple objects simultaneously? For example, if you have 5 people standing around a table could they all be transforming different photos at the same time?

Any suggestions/pointers would be a real help.

Thanks.

ekryski commented 12 years ago

Are you using a custom multitouch solution or is it a prebuilt one? The reason I'm asking is depending on what you are doing you are dealing with "real" touch events or simply click events meant to emulate touch. I am working on a solution that I will be open sourcing soon for the former.

drchriscreed commented 12 years ago

Do you mean in terms of hardware? If so, we're using a PQ Labs overlay (http://multi-touch-screen.com/) so they should be "real" touch events. It would be great to see your solution when it's available - any ideas on when you're planning to release it?

Thanks.

ekryski commented 12 years ago

Yep I figured as much ha ha. I have it working with a PQ Labs overlay as well. I'm working with TUIO so they are real touch events. Hammerjs only really supports touch events wrapped up by the OS or simulated touch events (ie. mouse clicks pretending to be touches). I'm hoping to have a version out in a week or two (depends how much free time I get) that handles TUIO, as well as simulated.

the-vesuvius commented 11 years ago

Hi,

Any updates on it? I've the same issue on iPad. I'm unable to transform multiple elements simultaneously.

Thanks

jtangelder commented 11 years ago

you should come far with touches[x].target, this contains the element that has been touched... but scaling etc, is now over all the touch points, not the points who only touch the target. This shoudnt be to hard, in the v2 version, the the Hammer.utils object contains some functions to calculate these properties.

the-vesuvius commented 11 years ago

Thanks for the response :)

jtangelder commented 11 years ago

The v2 drag demo contains some really basic code to do this. It moves elements around per finger (with .target). Maybe a nice startpoint.

the-vesuvius commented 11 years ago

It works. But there is other issue: when I'm transforming multiple elements simultaneously and release one of the elements, the 'transform' event isn't been fired on rest of elements any more, so I'm unable to manipulate them. I must to release all elements and start to transform them again. How can I fix it?

P.S. Sorry for my english :)