Stretch or pitch zoom movement

Hello,
do you know if exist a function to manage automaticcaly zoom in or zoom out by stretching or pitching movements on mobile ?

(Stretch: pressing two fingers together on the screen, move them away from each other as if stretching them apart )
Pinch: Pressing two fingers apart on the screen, move them towards each other as if pinching them together. )

Thanks,
J

The extension Swipe is the first idea to come to me.
It provide some expressions and conditions.

I 'm using it but I think it dosn’t satisfy my request.
I’m goingto write it.
Thanks,
J

It’s not too difficult - you just need to keep track of the first two touches, their starting positions (when the second touch is made),and work out the scale based on the touch positions relative to the centre of where the two touches started and their starting positions. Remember to use absolute values, to cater for touches moving past the centre.

1 Like

Thanks,
I’m writing it. I hoped that someone did it and share it as a function. I’m lazy :grin:

I wrote it: GitHub - jumpingjh/gdMultitouchZoom
It isn’t the best resolution but it works for me.

1 Like